mirror of https://github.com/docker/docs.git
Merge pull request #269 from ehazlett/integration-test-updates
integration test updates
This commit is contained in:
commit
241a003315
|
@ -5,10 +5,13 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
machineName = "machine-integration-test-%s"
|
machineName = "machine-integration-test-%s"
|
||||||
|
waitInterval = 30
|
||||||
|
waitDuration = time.Duration(waitInterval * time.Second)
|
||||||
)
|
)
|
||||||
|
|
||||||
func machineCreate(name string, t *testing.T, wg *sync.WaitGroup) {
|
func machineCreate(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
|
@ -107,6 +110,7 @@ func TestMachineStop(t *testing.T) {
|
||||||
go machineStop(d.name, t, &wg)
|
go machineStop(d.name, t, &wg)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
time.Sleep(waitDuration)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestMachineCreate will test that the driver starts the machine
|
// TestMachineCreate will test that the driver starts the machine
|
||||||
|
@ -121,6 +125,7 @@ func TestMachineStart(t *testing.T) {
|
||||||
go machineStart(d.name, t, &wg)
|
go machineStart(d.name, t, &wg)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
time.Sleep(waitDuration)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestMachineCreate will test that the driver kills the machine
|
// TestMachineCreate will test that the driver kills the machine
|
||||||
|
@ -135,6 +140,7 @@ func TestMachineKill(t *testing.T) {
|
||||||
go machineKill(d.name, t, &wg)
|
go machineKill(d.name, t, &wg)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
time.Sleep(waitDuration)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestMachineCreate will test that the driver removes the machine
|
// TestMachineCreate will test that the driver removes the machine
|
||||||
|
@ -149,4 +155,5 @@ func TestMachineRemove(t *testing.T) {
|
||||||
go machineRm(d.name, t, &wg)
|
go machineRm(d.name, t, &wg)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
time.Sleep(waitDuration)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
go test -v ./_integration-test
|
godep go test -v ./_integration-test
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue