aboutsummaryrefslogtreecommitdiff
path: root/test
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 /test
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 'test')
-rw-r--r--test/health_reload_test.go3
-rw-r--r--test/kubernetes_api_fallthrough_test.go (renamed from test/kubernetes_api_fallthrough.go)2
-rw-r--r--test/kubernetes_nsexposed_test.go2
-rw-r--r--test/kubernetes_pods_test.go2
4 files changed, 9 insertions, 0 deletions
diff --git a/test/health_reload_test.go b/test/health_reload_test.go
index 66e701532..042cd093c 100644
--- a/test/health_reload_test.go
+++ b/test/health_reload_test.go
@@ -42,6 +42,9 @@ func TestHealthReload(t *testing.T) {
t.Fatalf("Could not get health: %s", err)
}
body, err = ioutil.ReadAll(resp.Body)
+ if err != nil {
+ t.Fatalf("Could not get resp.Body: %s", err)
+ }
if x := string(body); x != "OK" {
t.Fatalf("Expect OK, got %s", x)
}
diff --git a/test/kubernetes_api_fallthrough.go b/test/kubernetes_api_fallthrough_test.go
index c33064018..20c0aaa21 100644
--- a/test/kubernetes_api_fallthrough.go
+++ b/test/kubernetes_api_fallthrough_test.go
@@ -1,3 +1,5 @@
+// +build k8s
+
package test
import (
diff --git a/test/kubernetes_nsexposed_test.go b/test/kubernetes_nsexposed_test.go
index f33c26c11..1c3e470e5 100644
--- a/test/kubernetes_nsexposed_test.go
+++ b/test/kubernetes_nsexposed_test.go
@@ -1,3 +1,5 @@
+// +build k8s
+
package test
import (
diff --git a/test/kubernetes_pods_test.go b/test/kubernetes_pods_test.go
index 933b41dab..a06d0aaac 100644
--- a/test/kubernetes_pods_test.go
+++ b/test/kubernetes_pods_test.go
@@ -1,3 +1,5 @@
+// +build k8s
+
package test
import (