aboutsummaryrefslogtreecommitdiff
path: root/middleware/dnstap/out/tcp_test.go
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com> 2017-09-01 10:21:05 -0700
committerGravatar Miek Gieben <miek@miek.nl> 2017-09-01 19:21:05 +0200
commit4b14243e9bb9fb6147771e7a5b76c934a28acdd7 (patch)
tree16c990ef82a84876d30e3e35270f5c2bc715b718 /middleware/dnstap/out/tcp_test.go
parent6493858893960c677f1af118ff53626366d40a22 (diff)
downloadcoredns-4b14243e9bb9fb6147771e7a5b76c934a28acdd7.tar.gz
coredns-4b14243e9bb9fb6147771e7a5b76c934a28acdd7.tar.zst
coredns-4b14243e9bb9fb6147771e7a5b76c934a28acdd7.zip
Add k8s tags to related tests (#1018)
, so that `make test` will pass by default. Also fixed several ineffassign and golint issues. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'middleware/dnstap/out/tcp_test.go')
-rw-r--r--middleware/dnstap/out/tcp_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/middleware/dnstap/out/tcp_test.go b/middleware/dnstap/out/tcp_test.go
index d76cd9280..113603cd4 100644
--- a/middleware/dnstap/out/tcp_test.go
+++ b/middleware/dnstap/out/tcp_test.go
@@ -5,7 +5,7 @@ import (
"testing"
)
-func sendOneTcp(tcp *TCP) error {
+func sendOneTCP(tcp *TCP) error {
if _, err := tcp.Write([]byte("frame")); err != nil {
return err
}
@@ -14,10 +14,10 @@ func sendOneTcp(tcp *TCP) error {
}
return nil
}
-func TestTcp(t *testing.T) {
+func TestTCP(t *testing.T) {
tcp := NewTCP("localhost:14000")
- if err := sendOneTcp(tcp); err == nil {
+ if err := sendOneTCP(tcp); err == nil {
t.Fatal("Not listening but no error.")
return
}
@@ -34,7 +34,7 @@ func TestTcp(t *testing.T) {
wait <- true
}()
- if err := sendOneTcp(tcp); err != nil {
+ if err := sendOneTCP(tcp); err != nil {
t.Fatalf("send one: %s", err)
return
}
@@ -44,7 +44,7 @@ func TestTcp(t *testing.T) {
// TODO: When the server isn't responding according to the framestream protocol
// the thread is blocked.
/*
- if err := sendOneTcp(tcp); err == nil {
+ if err := sendOneTCP(tcp); err == nil {
panic("must fail")
}
*/
@@ -54,7 +54,7 @@ func TestTcp(t *testing.T) {
wait <- true
}()
- if err := sendOneTcp(tcp); err != nil {
+ if err := sendOneTCP(tcp); err != nil {
t.Fatalf("send one: %s", err)
return
}