tests/e2e: fix failed /health test case

This commit is contained in:
tangcong 2020-06-06 15:35:53 +08:00
parent f77b21ce05
commit 330424142c
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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 {