aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/health/health.go2
-rw-r--r--plugin/health/health_test.go2
-rw-r--r--plugin/ready/ready.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/plugin/health/health.go b/plugin/health/health.go
index 55ff68407..2ac75f08d 100644
--- a/plugin/health/health.go
+++ b/plugin/health/health.go
@@ -42,7 +42,7 @@ func (h *health) OnStartup() error {
h.mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
// We're always healthy.
w.WriteHeader(http.StatusOK)
- io.WriteString(w, "OK")
+ io.WriteString(w, http.StatusText(http.StatusOK))
return
})
diff --git a/plugin/health/health_test.go b/plugin/health/health_test.go
index 7c7ad43a1..35ab285fe 100644
--- a/plugin/health/health_test.go
+++ b/plugin/health/health_test.go
@@ -31,7 +31,7 @@ func TestHealth(t *testing.T) {
}
response.Body.Close()
- if string(content) != "OK" {
+ if string(content) != http.StatusText(http.StatusOK) {
t.Errorf("Invalid response body: expecting 'OK', got '%s'", string(content))
}
}
diff --git a/plugin/ready/ready.go b/plugin/ready/ready.go
index ff19b59f8..0b08c22f4 100644
--- a/plugin/ready/ready.go
+++ b/plugin/ready/ready.go
@@ -45,7 +45,7 @@ func (rd *ready) onStartup() error {
ok, todo := plugins.Ready()
if ok {
w.WriteHeader(http.StatusOK)
- io.WriteString(w, "OK")
+ io.WriteString(w, http.StatusText(http.StatusOK))
return
}
log.Infof("Still waiting on: %q", todo)