From 749e687e1b52e87a51a92df02334603a68072462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 25 Apr 2023 12:00:12 +0200 Subject: [PATCH] integration/windows: Unskip some kill tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unskip: - TestKillWithStopSignalAndRestartPolicies - TestKillStoppedContainer integration tests on Windows. Signed-off-by: Paweł Gronowski (cherry picked from commit dd1c95edcde99cc5a2673567c4c47e939b8a4e41) Signed-off-by: Paweł Gronowski --- integration/container/kill_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/integration/container/kill_test.go b/integration/container/kill_test.go index 42adb7867a..219cd55bb2 100644 --- a/integration/container/kill_test.go +++ b/integration/container/kill_test.go @@ -82,7 +82,6 @@ func TestKillContainer(t *testing.T) { } func TestKillWithStopSignalAndRestartPolicies(t *testing.T) { - skip.If(t, testEnv.OSType == "windows", "Windows only supports 1.25 or later") defer setupTest(t)() client := testEnv.APIClient() @@ -103,6 +102,11 @@ func TestKillWithStopSignalAndRestartPolicies(t *testing.T) { }, } + var pollOpts []poll.SettingOp + if runtime.GOOS == "windows" { + pollOpts = append(pollOpts, poll.WithTimeout(StopContainerWindowsPollTimeout)) + } + for _, tc := range testCases { tc := tc t.Run(tc.doc, func(t *testing.T) { @@ -115,13 +119,12 @@ func TestKillWithStopSignalAndRestartPolicies(t *testing.T) { err := client.ContainerKill(ctx, id, "TERM") assert.NilError(t, err) - poll.WaitOn(t, container.IsInState(ctx, client, id, tc.status), poll.WithDelay(100*time.Millisecond)) + poll.WaitOn(t, container.IsInState(ctx, client, id, tc.status), pollOpts...) }) } } func TestKillStoppedContainer(t *testing.T) { - skip.If(t, testEnv.OSType == "windows", "Windows only supports 1.25 or later") defer setupTest(t)() ctx := context.Background() client := testEnv.APIClient()