Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
wip: integration test updates
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
  • Loading branch information
ehazlett committed Jan 13, 2015
1 parent e1da47b commit 3c55011
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion _integration-test/machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -149,4 +155,5 @@ func TestMachineRemove(t *testing.T) {
go machineRm(d.name, t, &wg)
}
wg.Wait()
time.Sleep(waitDuration)
}
2 changes: 1 addition & 1 deletion script/run-integration-tests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
go test -v ./_integration-test
godep go test -v ./_integration-test

0 comments on commit 3c55011

Please sign in to comment.