-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows CI: Enable swarm integration tests
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
- Loading branch information
Showing
22 changed files
with
169 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// +build !windows | ||
|
||
package swarm | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/docker/docker/testutil/daemon" | ||
"github.com/docker/docker/testutil/environment" | ||
"gotest.tools/v3/skip" | ||
) | ||
|
||
// NewSwarm creates a swarm daemon for testing | ||
func NewSwarm(t *testing.T, testEnv *environment.Execution, ops ...daemon.Option) *daemon.Daemon { | ||
t.Helper() | ||
skip.If(t, testEnv.IsRemoteDaemon) | ||
skip.If(t, testEnv.IsRootless, "rootless mode doesn't support Swarm-mode") | ||
if testEnv.DaemonInfo.ExperimentalBuild { | ||
ops = append(ops, daemon.WithExperimental()) | ||
} | ||
d := daemon.New(t, ops...) | ||
d.StartAndSwarmInit(t) | ||
return d | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// +build windows | ||
|
||
package swarm | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/docker/docker/testutil/daemon" | ||
"github.com/docker/docker/testutil/environment" | ||
) | ||
|
||
// On Windows we use swarm started by hack\ci\windows.ps1 | ||
func NewSwarm(t *testing.T, testEnv *environment.Execution, ops ...daemon.Option) *daemon.Daemon { | ||
t.Helper() | ||
|
||
d := &daemon.Daemon{} | ||
// d.StartAndSwarmInit(t) | ||
return d | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.