Merge pull request #269 from ehazlett/integration-test-updates

integration test updates
This commit is contained in:
Evan Hazlett 2015-01-13 10:01:52 -05:00
commit 241a003315
2 changed files with 9 additions and 2 deletions

View File

@ -5,10 +5,13 @@ import (
"os/exec"
"sync"
"testing"
"time"
)
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) {
@ -107,6 +110,7 @@ func TestMachineStop(t *testing.T) {
go machineStop(d.name, t, &wg)
}
wg.Wait()
time.Sleep(waitDuration)
}
// TestMachineCreate will test that the driver starts the machine
@ -121,6 +125,7 @@ func TestMachineStart(t *testing.T) {
go machineStart(d.name, t, &wg)
}
wg.Wait()
time.Sleep(waitDuration)
}
// TestMachineCreate will test that the driver kills the machine
@ -135,6 +140,7 @@ func TestMachineKill(t *testing.T) {
go machineKill(d.name, t, &wg)
}
wg.Wait()
time.Sleep(waitDuration)
}
// TestMachineCreate will test that the driver removes the machine
@ -149,4 +155,5 @@ func TestMachineRemove(t *testing.T) {
go machineRm(d.name, t, &wg)
}
wg.Wait()
time.Sleep(waitDuration)
}

View File

@ -1,3 +1,3 @@
#!/bin/sh
go test -v ./_integration-test
godep go test -v ./_integration-test