integration/windows: Unskip some kill tests
Unskip:
- TestKillWithStopSignalAndRestartPolicies
- TestKillStoppedContainer
integration tests on Windows.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit dd1c95edcd
)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
8895c32ba9
commit
749e687e1b
1 changed files with 6 additions and 3 deletions
|
@ -82,7 +82,6 @@ func TestKillContainer(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestKillWithStopSignalAndRestartPolicies(t *testing.T) {
|
func TestKillWithStopSignalAndRestartPolicies(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows", "Windows only supports 1.25 or later")
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
client := testEnv.APIClient()
|
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 {
|
for _, tc := range testCases {
|
||||||
tc := tc
|
tc := tc
|
||||||
t.Run(tc.doc, func(t *testing.T) {
|
t.Run(tc.doc, func(t *testing.T) {
|
||||||
|
@ -115,13 +119,12 @@ func TestKillWithStopSignalAndRestartPolicies(t *testing.T) {
|
||||||
err := client.ContainerKill(ctx, id, "TERM")
|
err := client.ContainerKill(ctx, id, "TERM")
|
||||||
assert.NilError(t, err)
|
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) {
|
func TestKillStoppedContainer(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows", "Windows only supports 1.25 or later")
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
client := testEnv.APIClient()
|
client := testEnv.APIClient()
|
||||||
|
|
Loading…
Reference in a new issue