From 6a16c7974a3d1dff9e9b9194a0634f887bbf64f4 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Thu, 5 Jul 2018 10:50:07 -0700 Subject: [PATCH] tests/e2e: handle cipher suite mismatch error in ubuntu Signed-off-by: Gyuho Lee --- tests/e2e/v3_cipher_suite_test.go | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/e2e/v3_cipher_suite_test.go b/tests/e2e/v3_cipher_suite_test.go index 9ed37341b..56393e4b5 100644 --- a/tests/e2e/v3_cipher_suite_test.go +++ b/tests/e2e/v3_cipher_suite_test.go @@ -55,12 +55,19 @@ func cipherSuiteTestValid(cx ctlCtx) { } func cipherSuiteTestMismatch(cx ctlCtx) { - if err := cURLGet(cx.epc, cURLReq{ - endpoint: "/metrics", - expected: "alert handshake failure", - metricsURLScheme: cx.cfg.metricsURLScheme, - ciphers: "ECDHE-RSA-DES-CBC3-SHA", // TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - }); err != nil { + var err error + for _, exp := range []string{"alert handshake failure", "failed setting cipher list"} { + err = cURLGet(cx.epc, cURLReq{ + endpoint: "/metrics", + expected: exp, + metricsURLScheme: cx.cfg.metricsURLScheme, + ciphers: "ECDHE-RSA-DES-CBC3-SHA", // TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + }) + if err == nil { + break + } + } + if err != nil { cx.t.Fatalf("failed get with curl (%v)", err) } }