From 3ba4c686a4a3d81343e741052ea964562989f043 Mon Sep 17 00:00:00 2001 From: Adelina Tuvenie Date: Thu, 19 Sep 2019 15:02:32 +0300 Subject: [PATCH] Check for terminated reason appropriate for containerD and dockershim Dockershim and containerD return different reasons for container not starting. This test should check for both in order to pass on both runtimes. --- test/e2e/windows/security_context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/windows/security_context.go b/test/e2e/windows/security_context.go index 4a4b4b50d75..384b579bf67 100644 --- a/test/e2e/windows/security_context.go +++ b/test/e2e/windows/security_context.go @@ -50,8 +50,8 @@ var _ = SIGDescribe("[Feature:Windows] SecurityContext RunAsUserName", func() { podInvalid, _ = f.PodClient().Get(podInvalid.Name, metav1.GetOptions{}) podTerminatedReason := testutils.TerminatedContainers(podInvalid)[runAsUserNameContainerName] - if "ContainerCannotRun" != podTerminatedReason { - framework.Failf("The container terminated reason was supposed to be: 'ContainerCannotRun', not: '%q'", podTerminatedReason) + if podTerminatedReason != "ContainerCannotRun" && podTerminatedReason != "StartError" { + framework.Failf("The container terminated reason was supposed to be: 'ContainerCannotRun' or 'StartError', not: '%q'", podTerminatedReason) } })