1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #39886 from thaJeztah/dont_reload_busybox

integration-cli: don't load busybox image on every daemon start
This commit is contained in:
Kirill Kolyshkin 2019-09-11 09:01:51 +03:00 committed by GitHub
commit bbf5c847fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View file

@ -312,7 +312,7 @@ func (s *DockerSwarmSuite) AddDaemon(c *testing.T, joinSwarm, manager bool) *dae
d.StartAndSwarmInit(c)
}
} else {
d.StartNode(c)
d.StartNodeWithBusybox(c)
}
s.daemonsLock.Lock()

View file

@ -20,12 +20,19 @@ var (
startArgs = []string{"--iptables=false", "--swarm-default-advertise-addr=lo"}
)
// StartNode starts daemon to be used as a swarm node
// StartNode (re)starts the daemon
func (d *Daemon) StartNode(t testingT) {
if ht, ok := t.(test.HelperT); ok {
ht.Helper()
}
// avoid networking conflicts
d.Start(t, startArgs...)
}
// StartNodeWithBusybox starts daemon to be used as a swarm node, and loads the busybox image
func (d *Daemon) StartNodeWithBusybox(t testingT) {
if ht, ok := t.(test.HelperT); ok {
ht.Helper()
}
d.StartWithBusybox(t, startArgs...)
}
@ -36,12 +43,12 @@ func (d *Daemon) RestartNode(t testingT) {
}
// avoid networking conflicts
d.Stop(t)
d.StartWithBusybox(t, startArgs...)
d.Start(t, startArgs...)
}
// StartAndSwarmInit starts the daemon (with busybox) and init the swarm
func (d *Daemon) StartAndSwarmInit(t testingT) {
d.StartNode(t)
d.StartNodeWithBusybox(t)
d.SwarmInit(t, swarm.InitRequest{})
}
@ -50,7 +57,7 @@ func (d *Daemon) StartAndSwarmJoin(t testingT, leader *Daemon, manager bool) {
if th, ok := t.(test.HelperT); ok {
th.Helper()
}
d.StartNode(t)
d.StartNodeWithBusybox(t)
tokens := leader.JoinTokens(t)
token := tokens.Worker