Skip to content

Commit 66a37b4

Browse files
committed
Windows: Enable more integration tests
Signed-off-by: Olli Janatuinen <[email protected]>
1 parent f99814d commit 66a37b4

9 files changed

Lines changed: 10 additions & 17 deletions

File tree

integration/build/build_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
)
2323

2424
func TestBuildWithRemoveAndForceRemove(t *testing.T) {
25-
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
2625
defer setupTest(t)()
2726

2827
cases := []struct {
@@ -189,7 +188,6 @@ func TestBuildMultiStageCopy(t *testing.T) {
189188

190189
func TestBuildMultiStageParentConfig(t *testing.T) {
191190
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.35"), "broken in earlier versions")
192-
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
193191
dockerfile := `
194192
FROM busybox AS stage0
195193
ENV WHO=parent
@@ -341,7 +339,6 @@ func TestBuildWithEmptyLayers(t *testing.T) {
341339
// #35652
342340
func TestBuildMultiStageOnBuild(t *testing.T) {
343341
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.33"), "broken in earlier versions")
344-
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
345342
defer setupTest(t)()
346343
// test both metadata and layer based commands as they may be implemented differently
347344
dockerfile := `FROM busybox AS stage1
@@ -448,7 +445,6 @@ COPY bar /`
448445
// docker/for-linux#135
449446
// #35641
450447
func TestBuildMultiStageLayerLeak(t *testing.T) {
451-
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
452448
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.37"), "broken in earlier versions")
453449
ctx := context.TODO()
454450
defer setupTest(t)()

integration/container/copy_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222

2323
func TestCopyFromContainerPathDoesNotExist(t *testing.T) {
2424
defer setupTest(t)()
25-
skip.If(t, testEnv.OSType == "windows")
2625

2726
ctx := context.Background()
2827
apiclient := testEnv.APIClient()
@@ -48,7 +47,6 @@ func TestCopyFromContainerPathIsNotDir(t *testing.T) {
4847

4948
func TestCopyToContainerPathDoesNotExist(t *testing.T) {
5049
defer setupTest(t)()
51-
skip.If(t, testEnv.OSType == "windows")
5250

5351
ctx := context.Background()
5452
apiclient := testEnv.APIClient()

integration/container/exec_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ func TestExecWithCloseStdin(t *testing.T) {
8585

8686
func TestExec(t *testing.T) {
8787
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.35"), "broken in earlier versions")
88-
skip.If(t, testEnv.OSType == "windows", "FIXME. Probably needs to wait for container to be in running state.")
8988
defer setupTest(t)()
9089
ctx := context.Background()
9190
client := testEnv.APIClient()
@@ -118,7 +117,11 @@ func TestExec(t *testing.T) {
118117
assert.NilError(t, err)
119118
out := string(r)
120119
assert.NilError(t, err)
121-
assert.Assert(t, is.Contains(out, "PWD=/tmp"), "exec command not running in expected /tmp working directory")
120+
expected := "PWD=/tmp"
121+
if testEnv.OSType == "windows" {
122+
expected = "PWD=C:/tmp"
123+
}
124+
assert.Assert(t, is.Contains(out, expected), "exec command not running in expected /tmp working directory")
122125
assert.Assert(t, is.Contains(out, "FOO=BAR"), "exec command not running with expected environment variable FOO")
123126
}
124127

integration/container/kill_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,39 @@ func TestKillContainerInvalidSignal(t *testing.T) {
3030
}
3131

3232
func TestKillContainer(t *testing.T) {
33-
skip.If(t, testEnv.OSType == "windows", "TODO Windows: FIXME. No SIGWINCH")
3433
defer setupTest(t)()
3534
client := testEnv.APIClient()
3635

3736
testCases := []struct {
3837
doc string
3938
signal string
4039
status string
40+
skipOs string
4141
}{
4242
{
4343
doc: "no signal",
4444
signal: "",
4545
status: "exited",
46+
skipOs: "",
4647
},
4748
{
4849
doc: "non killing signal",
4950
signal: "SIGWINCH",
5051
status: "running",
52+
skipOs: "windows",
5153
},
5254
{
5355
doc: "killing signal",
5456
signal: "SIGTERM",
5557
status: "exited",
58+
skipOs: "",
5659
},
5760
}
5861

5962
for _, tc := range testCases {
6063
tc := tc
6164
t.Run(tc.doc, func(t *testing.T) {
65+
skip.If(t, testEnv.OSType == tc.skipOs, "Windows does not support SIGWINCH")
6266
ctx := context.Background()
6367
id := container.Run(ctx, t, client)
6468
err := client.ContainerKill(ctx, id, tc.signal)

integration/container/nat_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ func TestNetworkNat(t *testing.T) {
4040
}
4141

4242
func TestNetworkLocalhostTCPNat(t *testing.T) {
43-
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
4443
skip.If(t, testEnv.IsRemoteDaemon)
4544

4645
defer setupTest(t)()

integration/container/resize_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
)
1818

1919
func TestResize(t *testing.T) {
20-
skip.If(t, testEnv.OSType == "windows", "FIXME")
2120
defer setupTest(t)()
2221
client := testEnv.APIClient()
2322
ctx := context.Background()

integration/image/remove_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ import (
99
"github.com/docker/docker/integration/internal/container"
1010
"gotest.tools/v3/assert"
1111
is "gotest.tools/v3/assert/cmp"
12-
"gotest.tools/v3/skip"
1312
)
1413

1514
func TestRemoveImageOrphaning(t *testing.T) {
16-
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
1715
defer setupTest(t)()
1816
ctx := context.Background()
1917
client := testEnv.APIClient()

integration/image/tag_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/docker/docker/testutil"
99
"gotest.tools/v3/assert"
1010
is "gotest.tools/v3/assert/cmp"
11-
"gotest.tools/v3/skip"
1211
)
1312

1413
// tagging a named image in a new unprefixed repo should work
@@ -95,7 +94,6 @@ func TestTagExistedNameWithoutForce(t *testing.T) {
9594
// ensure tagging using official names works
9695
// ensure all tags result in the same name
9796
func TestTagOfficialNames(t *testing.T) {
98-
skip.If(t, testEnv.OSType == "windows")
9997
defer setupTest(t)()
10098
client := testEnv.APIClient()
10199
ctx := context.Background()

integration/volume/volume_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/google/go-cmp/cmp/cmpopts"
1717
"gotest.tools/v3/assert"
1818
is "gotest.tools/v3/assert/cmp"
19-
"gotest.tools/v3/skip"
2019
)
2120

2221
func TestVolumesCreateAndList(t *testing.T) {
@@ -61,7 +60,6 @@ func TestVolumesCreateAndList(t *testing.T) {
6160
}
6261

6362
func TestVolumesRemove(t *testing.T) {
64-
skip.If(t, testEnv.OSType == "windows", "FIXME")
6563
defer setupTest(t)()
6664
client := testEnv.APIClient()
6765
ctx := context.Background()

0 commit comments

Comments
 (0)