91 Commits

Author SHA1 Message Date
Rafael Dantas Justo
97f81a2cb5 Test client with TLS support
See #297
2016-01-08 11:34:08 -02:00
Miek Gieben
f520760857 Lowercase all error msg from the tests 2015-11-26 14:12:38 +00:00
James Hartig
2d2c2ebcfc Instead of removing all RRs on Truncated, attempt to unpack 2015-11-01 15:51:09 -05:00
Masayoshi Sekimura
ae0cb9ccb6 deleting a dot to retrigger travis CI 2015-10-05 20:14:57 -07:00
Masa Sekimura
a9a71b9628 gofmt and revert unnecessary changes 2015-09-30 09:08:17 -07:00
Masayoshi Sekimura
a14e77725f tidyup a little with the latest golang.org/x/tools/cmd/vet 2015-09-29 23:04:25 -07:00
Alex Sergeyev
7eb4621b6c Remove TestSingleInflight as per #250 2015-09-15 11:24:38 -04:00
Michael Haro
4c495b2aea Correct formatting directive in Log call 2015-08-22 10:10:57 -07:00
Miek Gieben
996ff55983 minimize the race in TestSingleInflight 2015-08-22 13:42:02 +01:00
Miek Gieben
076c8ffa9a Rename TestSingleSingleInflight to TestSingleInflight and some cosmetic changes 2015-08-22 08:55:23 +01:00
Miek Gieben
3e549e2f6f And of course the test too 2015-07-03 09:34:46 +01:00
Alex Sergeyev
2f3bcbd506 Added function for lazy message reading per #222 2015-06-28 20:21:37 -04:00
Michael Haro
dddcd696ba Check that the query ID matches the answer ID.
Reduce some code duplication by making Exchange() use Client.Exchange().

When performing an Exchange if the query ID does not match the answer ID
return an error.  Also add a test for this condition.
2015-05-05 23:00:16 -07:00
Harvo Jones
57d8407ad7 Changes applied:
* Renamed EDNS0_CUSTOM to EDNS0_LOCAL
* Added EDNS0LOCAL constants
* Added documentation
2015-03-18 12:12:53 -07:00
Harvo Jones
8bd3ac773f Add support for custom EDNS options in GoDNS.
A handful of EDNS options have been standardized, and they each have a type defined in GoDNS.  However there is currently no way a development team can use GoDNS with internally defined options, or with new options that may be proposed in the future.

This change solves the problem by giving users an EDNS0_CUSTOM type to allow clients to send, and servers to receive, custom EDNS options.
2015-03-17 10:41:55 -07:00
Michael Haro
2fb2a25e84 More test clean up
Remove trailing \n from t.Log and t.Error messages as it's unnecessary.

In some instances, combine multiple t.Error()s into one

To provide more consistency across the tests, rename e to err and use %v
as the format arg for errors.

Replace Logf and Errorf with Log and Error when it made sense.  For
example t.Errorf("%v", err) to t.Error(err)
2015-02-25 22:14:21 -08:00
Michael Haro
f995f1aff3 Convert tests from being t.Log(..) then t.Fail() to just t.Error(...) as
t.Error(...) does both and makes it more clear which messages are errors
vs information log messages.
2015-02-23 17:43:07 -08:00
Miek Gieben
67945c119e A bunch of golint fixes
The proposed vars names are a nono, because they break the API.
Things left: document each RR and zscan_rr.go has some funcky if-then-elses.
2015-02-19 09:58:33 +00:00
Miek Gieben
d344ff065b Move all AXFR tests to their own file 2015-01-21 17:37:20 +00:00
Miek Gieben
a8bb44f5e5 Move tests and start update_test.go
Put the update tests in a seperate file.
2014-11-09 09:56:22 +00:00
Miek Gieben
0aa3021a83 Remove all copyright notices
Use the central COPYRIGHT file.
2014-09-11 20:57:37 +01:00
Miek Gieben
85189d35e4 Add Exchange in the test.
Increases test coverage.
2014-08-30 15:06:20 +01:00
Alex Sergeyev
3489112d72 Addressed #115 (default mux should be cleaned after tests) 2014-08-30 09:45:30 -04:00
Alex Sergeyev
e7a401841e Fixed client tests and removed TODO about timeouts 2014-08-29 08:59:19 -04:00
Miek Gieben
f5fe400c53 Lowercase all test output.
Add Shutdown tests as well
2014-08-19 08:39:04 +00:00
Miek Gieben
09b05ded46 Remove external DNS dependency
This makes the test run 10x faster and does not require internet
access for running the tests.
2014-02-15 08:03:40 +00:00
Miek Gieben
68083bc956 Fix merge conflict from net branch 2013-10-12 17:59:46 +01:00
Miek Gieben
f3d8fc6c34 Fix tsig tests and tweak q 2013-10-12 15:35:26 +01:00
Miek Gieben
675f170a3d Fix axfr tsig 2013-10-12 14:00:10 +01:00
Miek Gieben
af4ef472c0 Comment out xfr tests
AXFR broke, because I removed the DNS server from my old server.
In the net branch I plan to refactor all this, so I'm not dealing with
it now here in the master branch.
2013-10-02 19:29:57 +01:00
Miek Gieben
bf37f92d4a Some test tweaking 2013-09-29 11:30:03 +01:00
Miek Gieben
500a32e64f Update all the tests 2013-09-29 11:26:02 +01:00
Miek Gieben
a743ae8b68 Some more changes.
Still pondering dns.Conn and a dns.Dial
2013-09-28 22:16:15 +01:00
Miek Gieben
2b6e9122bd Use the better name: SingleInflight 2013-09-06 09:49:07 +00:00
Miek Gieben
cb9ec711f5 Add (failing) test for zero rdata 2013-08-25 21:38:10 -07:00
Miek Gieben
bb71be0271 Implement outstanding query detection.
Copied from the standard library and adapted to Go DNS.
2013-08-24 02:28:58 +00:00
Miek Gieben
c66494c6c5 Resolv merge conflicts 2013-05-12 19:08:37 +02:00
Miek Gieben
f595bf7a06 Set license on test files 2013-05-12 16:09:52 +02:00
Miek Gieben
da9a970a5e Fix the newer names for EDNS0 2013-05-09 08:27:49 +02:00
Miek Gieben
235e892dfc Rename the RR types drop the RR_ prefix
This is also done in the official Go library. It also make the
code shorter.
2012-12-09 19:23:25 +01:00
Miek Gieben
2d1d1303c1 Update the tests 2012-12-02 09:31:42 +01:00
Miek Gieben
49ca0cd3df remove async test as we no longer have that function 2012-11-19 19:25:55 +01:00
Miek Gieben
0cb7706e03 Use my new static ip address 2012-11-19 16:19:17 +01:00
Miek Gieben
4e2af5cdb1 gofmt 2012-11-19 16:17:13 +01:00
Miek Gieben
fa8a5e5757 Fix the tests + gofmt 2012-11-19 16:15:03 +01:00
Miek Gieben
9ca924a069 Rename dynamic update functions (again)
* Use simple names and add zone Remove function for dynamic update use.
* Locking 'n stuff is all taken care off
* TSIG is working and the duplicate code is removed.
* readClient and writeClient are renamed read and write, because that is
  what they do.
2012-10-16 10:41:20 +02:00
Alex Polvi
ec8d3d51d1 initial stab at edns update lease http://files.dns-sd.org/draft-sekar-dns-ul.txt 2012-10-15 18:37:19 +01:00
Miek Gieben
10a349423c Fix tests and tsig in the process 2012-10-09 22:45:19 +02:00
Miek Gieben
b90200a0df Fix test 2012-08-31 14:59:56 +02:00
Miek Gieben
1dffbeeee1 Fix IsSubDomain 2012-08-08 15:16:22 +02:00