mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #38469 from olljanat/win-more-integration-tests
Windows CI: Enable more integration tests
This commit is contained in:
commit
4ce3d71c1a
9 changed files with 10 additions and 17 deletions
|
@ -22,7 +22,6 @@ import (
|
|||
)
|
||||
|
||||
func TestBuildWithRemoveAndForceRemove(t *testing.T) {
|
||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||
defer setupTest(t)()
|
||||
|
||||
cases := []struct {
|
||||
|
@ -189,7 +188,6 @@ func TestBuildMultiStageCopy(t *testing.T) {
|
|||
|
||||
func TestBuildMultiStageParentConfig(t *testing.T) {
|
||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.35"), "broken in earlier versions")
|
||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||
dockerfile := `
|
||||
FROM busybox AS stage0
|
||||
ENV WHO=parent
|
||||
|
@ -341,7 +339,6 @@ func TestBuildWithEmptyLayers(t *testing.T) {
|
|||
// #35652
|
||||
func TestBuildMultiStageOnBuild(t *testing.T) {
|
||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.33"), "broken in earlier versions")
|
||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||
defer setupTest(t)()
|
||||
// test both metadata and layer based commands as they may be implemented differently
|
||||
dockerfile := `FROM busybox AS stage1
|
||||
|
@ -448,7 +445,6 @@ COPY bar /`
|
|||
// docker/for-linux#135
|
||||
// #35641
|
||||
func TestBuildMultiStageLayerLeak(t *testing.T) {
|
||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.37"), "broken in earlier versions")
|
||||
ctx := context.TODO()
|
||||
defer setupTest(t)()
|
||||
|
|
|
@ -22,7 +22,6 @@ import (
|
|||
|
||||
func TestCopyFromContainerPathDoesNotExist(t *testing.T) {
|
||||
defer setupTest(t)()
|
||||
skip.If(t, testEnv.OSType == "windows")
|
||||
|
||||
ctx := context.Background()
|
||||
apiclient := testEnv.APIClient()
|
||||
|
@ -48,7 +47,6 @@ func TestCopyFromContainerPathIsNotDir(t *testing.T) {
|
|||
|
||||
func TestCopyToContainerPathDoesNotExist(t *testing.T) {
|
||||
defer setupTest(t)()
|
||||
skip.If(t, testEnv.OSType == "windows")
|
||||
|
||||
ctx := context.Background()
|
||||
apiclient := testEnv.APIClient()
|
||||
|
|
|
@ -85,7 +85,6 @@ func TestExecWithCloseStdin(t *testing.T) {
|
|||
|
||||
func TestExec(t *testing.T) {
|
||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.35"), "broken in earlier versions")
|
||||
skip.If(t, testEnv.OSType == "windows", "FIXME. Probably needs to wait for container to be in running state.")
|
||||
defer setupTest(t)()
|
||||
ctx := context.Background()
|
||||
client := testEnv.APIClient()
|
||||
|
@ -118,7 +117,11 @@ func TestExec(t *testing.T) {
|
|||
assert.NilError(t, err)
|
||||
out := string(r)
|
||||
assert.NilError(t, err)
|
||||
assert.Assert(t, is.Contains(out, "PWD=/tmp"), "exec command not running in expected /tmp working directory")
|
||||
expected := "PWD=/tmp"
|
||||
if testEnv.OSType == "windows" {
|
||||
expected = "PWD=C:/tmp"
|
||||
}
|
||||
assert.Assert(t, is.Contains(out, expected), "exec command not running in expected /tmp working directory")
|
||||
assert.Assert(t, is.Contains(out, "FOO=BAR"), "exec command not running with expected environment variable FOO")
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ func TestKillContainerInvalidSignal(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestKillContainer(t *testing.T) {
|
||||
skip.If(t, testEnv.OSType == "windows", "TODO Windows: FIXME. No SIGWINCH")
|
||||
defer setupTest(t)()
|
||||
client := testEnv.APIClient()
|
||||
|
||||
|
@ -38,27 +37,32 @@ func TestKillContainer(t *testing.T) {
|
|||
doc string
|
||||
signal string
|
||||
status string
|
||||
skipOs string
|
||||
}{
|
||||
{
|
||||
doc: "no signal",
|
||||
signal: "",
|
||||
status: "exited",
|
||||
skipOs: "",
|
||||
},
|
||||
{
|
||||
doc: "non killing signal",
|
||||
signal: "SIGWINCH",
|
||||
status: "running",
|
||||
skipOs: "windows",
|
||||
},
|
||||
{
|
||||
doc: "killing signal",
|
||||
signal: "SIGTERM",
|
||||
status: "exited",
|
||||
skipOs: "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.doc, func(t *testing.T) {
|
||||
skip.If(t, testEnv.OSType == tc.skipOs, "Windows does not support SIGWINCH")
|
||||
ctx := context.Background()
|
||||
id := container.Run(ctx, t, client)
|
||||
err := client.ContainerKill(ctx, id, tc.signal)
|
||||
|
|
|
@ -40,7 +40,6 @@ func TestNetworkNat(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestNetworkLocalhostTCPNat(t *testing.T) {
|
||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||
skip.If(t, testEnv.IsRemoteDaemon)
|
||||
|
||||
defer setupTest(t)()
|
||||
|
|
|
@ -17,7 +17,6 @@ import (
|
|||
)
|
||||
|
||||
func TestResize(t *testing.T) {
|
||||
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
||||
defer setupTest(t)()
|
||||
client := testEnv.APIClient()
|
||||
ctx := context.Background()
|
||||
|
|
|
@ -9,11 +9,9 @@ import (
|
|||
"github.com/docker/docker/integration/internal/container"
|
||||
"gotest.tools/v3/assert"
|
||||
is "gotest.tools/v3/assert/cmp"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
func TestRemoveImageOrphaning(t *testing.T) {
|
||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||
defer setupTest(t)()
|
||||
ctx := context.Background()
|
||||
client := testEnv.APIClient()
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
"github.com/docker/docker/testutil"
|
||||
"gotest.tools/v3/assert"
|
||||
is "gotest.tools/v3/assert/cmp"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
// tagging a named image in a new unprefixed repo should work
|
||||
|
@ -95,7 +94,6 @@ func TestTagExistedNameWithoutForce(t *testing.T) {
|
|||
// ensure tagging using official names works
|
||||
// ensure all tags result in the same name
|
||||
func TestTagOfficialNames(t *testing.T) {
|
||||
skip.If(t, testEnv.OSType == "windows")
|
||||
defer setupTest(t)()
|
||||
client := testEnv.APIClient()
|
||||
ctx := context.Background()
|
||||
|
|
|
@ -16,7 +16,6 @@ import (
|
|||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"gotest.tools/v3/assert"
|
||||
is "gotest.tools/v3/assert/cmp"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
func TestVolumesCreateAndList(t *testing.T) {
|
||||
|
@ -61,7 +60,6 @@ func TestVolumesCreateAndList(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestVolumesRemove(t *testing.T) {
|
||||
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
||||
defer setupTest(t)()
|
||||
client := testEnv.APIClient()
|
||||
ctx := context.Background()
|
||||
|
|
Loading…
Reference in a new issue