Browse code

integration/windows: Unskip some kill tests

Unskip:
- TestKillWithStopSignalAndRestartPolicies
- TestKillStoppedContainer

integration tests on Windows.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Paweł Gronowski authored on 2023/04/25 19:00:12
Showing 1 changed files
... ...
@@ -82,7 +82,6 @@ func TestKillContainer(t *testing.T) {
82 82
 }
83 83
 
84 84
 func TestKillWithStopSignalAndRestartPolicies(t *testing.T) {
85
-	skip.If(t, testEnv.DaemonInfo.OSType == "windows", "Windows only supports 1.25 or later")
86 85
 	defer setupTest(t)()
87 86
 	client := testEnv.APIClient()
88 87
 
... ...
@@ -103,6 +102,11 @@ func TestKillWithStopSignalAndRestartPolicies(t *testing.T) {
103 103
 		},
104 104
 	}
105 105
 
106
+	var pollOpts []poll.SettingOp
107
+	if runtime.GOOS == "windows" {
108
+		pollOpts = append(pollOpts, poll.WithTimeout(StopContainerWindowsPollTimeout))
109
+	}
110
+
106 111
 	for _, tc := range testCases {
107 112
 		tc := tc
108 113
 		t.Run(tc.doc, func(t *testing.T) {
... ...
@@ -115,13 +119,12 @@ func TestKillWithStopSignalAndRestartPolicies(t *testing.T) {
115 115
 			err := client.ContainerKill(ctx, id, "TERM")
116 116
 			assert.NilError(t, err)
117 117
 
118
-			poll.WaitOn(t, container.IsInState(ctx, client, id, tc.status), poll.WithDelay(100*time.Millisecond))
118
+			poll.WaitOn(t, container.IsInState(ctx, client, id, tc.status), pollOpts...)
119 119
 		})
120 120
 	}
121 121
 }
122 122
 
123 123
 func TestKillStoppedContainer(t *testing.T) {
124
-	skip.If(t, testEnv.DaemonInfo.OSType == "windows", "Windows only supports 1.25 or later")
125 124
 	defer setupTest(t)()
126 125
 	ctx := context.Background()
127 126
 	client := testEnv.APIClient()