From 330424142c7fb86876004debac396a5d23b01708 Mon Sep 17 00:00:00 2001 From: tangcong Date: Sat, 6 Jun 2020 15:35:53 +0800 Subject: [PATCH] tests/e2e: fix failed /health test case --- tests/e2e/ctl_v3_alarm_test.go | 2 +- tests/e2e/metrics_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/ctl_v3_alarm_test.go b/tests/e2e/ctl_v3_alarm_test.go index 4d3df2a93d2..a6ef5e3987c 100644 --- a/tests/e2e/ctl_v3_alarm_test.go +++ b/tests/e2e/ctl_v3_alarm_test.go @@ -53,7 +53,7 @@ func alarmTest(cx ctlCtx) { } // '/health' handler should return 'false' - if err := cURLGet(cx.epc, cURLReq{endpoint: "/health", expected: `{"health":"false"}`}); err != nil { + if err := cURLGet(cx.epc, cURLReq{endpoint: "/health", expected: `{"health":"false","reason":"ALARM NOSPACE"}`}); err != nil { cx.t.Fatalf("failed get with curl (%v)", err) } diff --git a/tests/e2e/metrics_test.go b/tests/e2e/metrics_test.go index 1ce401d9318..e20b0f88d5c 100644 --- a/tests/e2e/metrics_test.go +++ b/tests/e2e/metrics_test.go @@ -49,7 +49,7 @@ func metricsTest(cx ctlCtx) { {"/metrics", fmt.Sprintf("etcd_mvcc_delete_total 3")}, {"/metrics", fmt.Sprintf(`etcd_server_version{server_version="%s"} 1`, version.Version)}, {"/metrics", fmt.Sprintf(`etcd_cluster_version{cluster_version="%s"} 1`, version.Cluster(version.Version))}, - {"/health", `{"health":"true"}`}, + {"/health", `{"health":"true","reason":""}`}, } { i++ if err := ctlV3Put(cx, fmt.Sprintf("%d", i), "v", ""); err != nil {