aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-10-10 18:30:30 +0200
committerGravatar GitHub <noreply@github.com> 2017-10-10 18:30:30 +0200
commit8ed730e1cb6332fcdeb2f83228449335ebf80a5b (patch)
tree8c56f99434ac6167f5e24903f3ffb756c71dd598
parent7a64d1bbc36ec69c384fa71b7f28ab353a29e7ef (diff)
downloadcoredns-8ed730e1cb6332fcdeb2f83228449335ebf80a5b.tar.gz
coredns-8ed730e1cb6332fcdeb2f83228449335ebf80a5b.tar.zst
coredns-8ed730e1cb6332fcdeb2f83228449335ebf80a5b.zip
test: remove health reload test (#1142)
Flaky test because it used a fix port; just drop it. Might be worthwhile to return it as a unit tests, but on that level we can't use a coredns "process" to exercise the reload.
-rw-r--r--test/health_reload_test.go52
1 files changed, 0 insertions, 52 deletions
diff --git a/test/health_reload_test.go b/test/health_reload_test.go
deleted file mode 100644
index 042cd093c..000000000
--- a/test/health_reload_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package test
-
-import (
- "io/ioutil"
- "log"
- "net/http"
- "testing"
-)
-
-func TestHealthReload(t *testing.T) {
- log.SetOutput(ioutil.Discard)
-
- // Corefile with for example without proxy section.
- corefile := `example.org:0 {
- health localhost:35080
-}
-`
- i, err := CoreDNSServer(corefile)
- if err != nil {
- t.Fatalf("Could not get CoreDNS serving instance: %s", err)
- }
-
- resp, err := http.Get("http://localhost:35080/health")
- if err != nil {
- t.Fatalf("Could not get health: %s", err)
- }
- body, err := ioutil.ReadAll(resp.Body)
- if x := string(body); x != "OK" {
- t.Fatalf("Expect OK, got %s", x)
- }
- resp.Body.Close()
-
- i, err = i.Restart(NewInput(corefile))
- if err != nil {
- t.Fatalf("Could not restart CoreDNS serving instance: %s", err)
- }
-
- defer i.Stop()
-
- resp, err = http.Get("http://localhost:35080/health")
- if err != nil {
- 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)
- }
- resp.Body.Close()
-}