From 6558d91bab19952513e1ef9f76e3348a0ec61f38 Mon Sep 17 00:00:00 2001 From: Matej Kralik Date: Thu, 27 Jun 2024 16:35:09 +0200 Subject: [PATCH] [OSSM-6747] Update log message in OSSM 2.6 for TestPluginCaCert test (#697) --- .../security/certmanager/plugin_ca_test.go | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkg/tests/tasks/security/certmanager/plugin_ca_test.go b/pkg/tests/tasks/security/certmanager/plugin_ca_test.go index d22cdbe9..1e02c149 100644 --- a/pkg/tests/tasks/security/certmanager/plugin_ca_test.go +++ b/pkg/tests/tasks/security/certmanager/plugin_ca_test.go @@ -66,12 +66,22 @@ func TestPluginCaCert(t *testing.T) { oc.WaitSMCPReady(t, meshNamespace, smcpName) t.LogStep("Verify that cacerts secret was detected") - retry.UntilSuccess(t, func(t test.TestHelper) { - oc.Logs(t, pod.MatchingSelector("app=istiod", meshNamespace), "discovery", assert.OutputContains( - "Use plugged-in cert at etc/cacerts/tls.key", - "Istiod detected cacerts secret correctly", - "Istiod did not detect cacerts secret")) - }) + + if env.GetSMCPVersion().LessThan(version.SMCP_2_6) { + retry.UntilSuccess(t, func(t test.TestHelper) { + oc.Logs(t, pod.MatchingSelector("app=istiod", meshNamespace), "discovery", assert.OutputContains( + "Use plugged-in cert at etc/cacerts/tls.key", + "Istiod detected cacerts secret correctly", + "Istiod did not detect cacerts secret")) + }) + } else { + retry.UntilSuccess(t, func(t test.TestHelper) { + oc.Logs(t, pod.MatchingSelector("app=istiod", meshNamespace), "discovery", assert.OutputContains( + "DNS certs use plugged-in cert at etc/cacerts/tls.key", + "Istiod detected cacerts secret correctly", + "Istiod did not detect cacerts secret")) + }) + } t.LogStep("Deploy httpbin and sleep") app.InstallAndWaitReady(t, app.Httpbin(ns.Foo), app.Sleep(ns.Foo))