James Phillips
2de1cd5a4a
test: Turns off ACLs for catalog and health WAN translation tests.
...
Since this was doing registration to a foreign DC, it needs extra time
for the route to the ACL datacenter to be set up. ACLs aren't part of
this test, so by disabling them we make this more reliable and converge
faster than if we had added a retry.
2017-05-05 17:07:03 +02:00
Frank Schroeder
21a82a0a16
test: Refactor WaitForResult tests with retry
...
Refactor tests that use testutil.WaitForResult to use retry.
Since this requires refactoring the test functions in general this patch
also shows the use of the github.com/pascaldekloe/goe/verify library
which provides a good mechanism for comparing nested data structures.
Instead of just converting the tests from testutil.WaitForResult to
retry the tests that performing a nested comparison of data structures
are converted to the verify library at the same time.
2017-05-05 17:07:02 +02:00
Frank Schroeder
48fa2962eb
Revert "test: Run command/agent tests in parallel"
...
This reverts commit 17be40a733
.
2017-04-27 14:39:04 -07:00
Frank Schroeder
17be40a733
test: Run command/agent tests in parallel
2017-04-27 10:34:30 -07:00
Frank Schroeder
8bb7792799
golint: Drop the unused value from range
...
for i, _ := range foo -> for i := range foo
2017-04-25 09:26:13 -07:00
Frank Schroeder
eddb1af603
Remove duplicate constants
...
This patch removes duplicate internal copies of constants in the structs
package which are also defined in the api package. The api.KVOp type
with all its values for the TXN endpoint and the api.HealthXXX constants
are now used throughout the codebase.
This resulted in some circular dependencies in the testutil package
which have been resolved by copying code and constants and moving the
WaitForLeader function into a separate testrpc package.
2017-04-20 09:54:49 -07:00
Seth Vargo
0170a28ec9
Use new APIs
2017-03-23 18:48:13 -04:00
James Phillips
3103f7f673
Merge pull request #2690 from zeroae/f-simple-rfc2782
...
RFC 2782 support with optional .service tag
2017-03-02 14:49:36 -08:00
James Phillips
e9cc66ab51
Fixes issue with missing CNAME for services with non-IP addresses set in SRV responses.
2017-01-31 20:57:50 -08:00
Patrick Sodré
c135c08fb2
Simple RFC 2782 support with optional .service tag
...
Add support for SRV queries of names matching:
_<service>._<protocol>.[.service][.datacenter]<.domain>
2017-01-30 19:46:02 -05:00
James Phillips
0ed6b1bb18
Bans anonymous queries that aren't tied to a session.
...
This gets us coverage of PQ creation under the existing service
policy or the soon-to-be-added session policy.
2016-12-12 14:52:27 -08:00
James Phillips
c06a107638
Removes unnecessary clause in unit test check.
2016-11-03 12:26:48 -07:00
James Phillips
7b98ae921e
Adds support for DNS recurse truncation. ( #2467 )
...
* Return message from recurse even if truncated
Signed-off-by: Evan Farrar <efarrar@pivotal.io>
* Tweaks unit test.
2016-11-03 12:21:16 -07:00
Kyle Havlovitz
63534aca7e
Added tests for lookups on the 'addr.consul' domain
2016-10-27 21:04:06 -07:00
Kyle Havlovitz
84c87325ae
Add a service address SRV lookup test for IPv6
2016-10-27 21:04:06 -07:00
Kyle Havlovitz
f7ef84812d
Fix test cases
2016-10-27 21:04:06 -07:00
Kyle Havlovitz
554440ab1d
Resolve Consul CNAME records on external services ( #2444 )
2016-10-26 19:23:51 -07:00
James Phillips
da34496645
Fixes a typo in a test error message.
2016-09-01 21:52:29 -07:00
Pivotal DX129
fe61650ef0
Merge remote-tracking branch 'upstream/master'
2016-09-01 10:15:32 -04:00
James Phillips
ed7356dd5c
Changes default DNS allow_stale to true.
2016-08-30 13:55:19 -07:00
Pierre Delagrave
db8ff0a582
Made the dns recursor timeout test more reliable
2016-08-29 13:23:14 -04:00
Pierre Delagrave
d9bd41fc4d
Renamed dns config parameter internal_client_timeout for recursor_timeout
2016-08-26 15:22:04 -04:00
Pierre Delagrave
c8c4b9d344
Added a configurable timeout to the client making DNS queries to downstream name servers
2016-08-23 16:59:38 -04:00
James Phillips
defa2a6180
Merge pull request #2226 from abhinavdahiya/rm-health-unknown
...
Fixes #1775 ; Removes 'unknown' state
2016-08-17 17:51:04 -07:00
James Phillips
a53c6a38e2
Tweaks DNS prepared query failover unit test.
2016-08-12 17:16:08 -07:00
Max Timchenko
3b08db47dc
Corrects two issues with DNS prepared query failover
...
When DNS prepared query fails over to another datacenter and the datacenter
returns some nodes, the DNS result does not translate WAN addresses even when
translation is enabled for SRV and A queries, and returns the wrong datacenter
(the one that failed over) for SRV queries.
2016-08-12 17:06:43 -07:00
James Phillips
17c10d78bc
Passes the index by reference so we can control the allocation.
2016-08-12 14:51:50 -07:00
James Phillips
f7fcb03004
Makes name compares case-insensitive.
2016-08-12 12:16:21 -07:00
James Phillips
34d6c2d5e1
Fixes the DNS SRV trim bug.
2016-08-11 21:46:14 -07:00
James Phillips
bcb0f71759
Finishes up DNS compression by adding opt-out, tests, and documentation. Fixes trim routine.
2016-08-11 16:27:08 -07:00
Abhinav Dahiya
7c6c3b38bc
Fixes #1775 ; Removes 'unknown' state
...
Signed-off-by: Abhinav Dahiya <abhinavdtu2012@gmail.com>
2016-07-30 19:33:14 +05:30
Ryan Uber
00819e89de
agent: test that DNS passes the agent data through
2016-07-01 09:46:26 -07:00
Sean Chittenden
53380f8e92
Change tests to accept an "at least this many" answers semantic
...
The size of answers vary based on the target platform. Accomodate this variance.
2016-03-30 11:48:32 -07:00
Sean Chittenden
7a7063c072
Fix tests
...
I'm not sure how I thought this passed last night, it was obviously wrong.
2016-03-30 10:16:05 -07:00
Sean Chittenden
5ba7e74bb8
Use table-driven test for response limits
...
Much more exhaustive testing and shows where the limits are of the 512B limitation (quering by ID is less space efficient than querying by just a prepared query or service).
2016-03-30 01:05:49 -07:00
Sean Chittenden
0cb965f901
Remove duplicate paste-o
...
Pointed out by: slackpad
2016-03-29 23:31:31 -07:00
Sean Chittenden
ce88cde7b0
Test services and PQT limits
2016-03-29 23:08:58 -07:00
Sean Chittenden
e1e441fdee
Improve the use of constants across DNS tests
2016-03-29 23:08:40 -07:00
Sean Chittenden
9fb64ab114
Allow adjusting the number of DNS records in a response...
...
Based on work done by @fusiondog in #1583 , extend the concept to use an integer instead of a boolean.
Fixes : #1583 && #1481
2016-03-29 19:23:56 -07:00
James Phillips
5c80647e34
Tweaks algorithm so it's safe with an empty list and adds a PQ test.
2016-03-08 23:09:09 -08:00
Igor Dubinskiy
3a25860270
Make sure UDP DNS responses aren't larger than allowed
2016-03-07 16:41:17 -08:00
James Phillips
607728ddca
Adds a test to make sure we get the local address within the DC.
2016-02-07 14:16:15 -08:00
James Phillips
c60a526fde
Sets up config for more address tags down the road, renames struct members.
2016-02-07 10:37:34 -08:00
Evan Gilman
de8fd561d0
Use a map for additional node addresses
2016-02-06 23:01:45 -08:00
Evan Gilman
2f26771bb1
Add tests for consul WAN translation
2016-02-06 23:01:45 -08:00
James Phillips
cd6be4a88d
Avoids taking the length again when parsing DNS queries.
2015-11-17 08:40:47 -08:00
James Phillips
4715c04c98
Adds a test to make sure a stale retry terminates.
2015-11-15 17:06:00 -08:00
James Phillips
e9480ecb02
Plumbs the service name back and uses agent-specific TTL settings as a fallback.
2015-11-15 17:06:00 -08:00
James Phillips
81b43135f9
Adds unit tests for prepared queries and DNS, using existing tests for equivalence.
2015-11-15 17:06:00 -08:00
James Phillips
98731f7272
Fixes unit test fail due to expected truncated message.
2015-11-12 18:16:44 -08:00