Skip to content

Commit

Permalink
Added some comments to the test to explain why we're doing stuff this…
Browse files Browse the repository at this point in the history
… way
  • Loading branch information
cbednarski committed Nov 11, 2015
1 parent fdd21d3 commit 9fd9e33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/driver/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func dockerIsConnected(t *testing.T) bool {
return false
}

// Creating a client doesn't actually connect, so make sure we do something
// like call Version() on it.
env, err := client.Version()
if err != nil {
t.Logf("Failed to connect to docker daemon: %s", err)
Expand Down Expand Up @@ -171,6 +173,9 @@ func TestDockerDriver_Start_Wait(t *testing.T) {
}

func TestDockerDriver_Start_Wait_AllocDir(t *testing.T) {
// This test requires that the alloc dir be mounted into docker as a volume.
// Because this cannot happen when docker is run remotely, e.g. when running
// docker in a VM, we skip this when we detect Docker is being run remotely.
if !dockerIsConnected(t) || dockerIsRemote(t) {
t.SkipNow()
}
Expand Down

0 comments on commit 9fd9e33

Please sign in to comment.