Skip to content

Commit

Permalink
Fix acceptance tests
Browse files Browse the repository at this point in the history
We should handle such cases when more than one folder are shared with the VM
  • Loading branch information
legal90 committed Nov 4, 2015
1 parent 8b9e686 commit c40c0b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/parallels/boot2docker_vagrant_parallels.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DOCKER_TARGET_VERSION=1.9.0
# Assume that Vagrantfile exists and basebox is added
@test "vagrant up" {
run vagrant destroy -f
run vagrant box remove boot2docker-virtualbox-test
run vagrant box remove boot2docker-parallels-test
cp vagrantfile.orig Vagrantfile
vagrant up --provider=parallels
}
Expand Down Expand Up @@ -40,7 +40,7 @@ DOCKER_TARGET_VERSION=1.9.0
}

@test "Default synced folder is shared via prl_fs" {
mount_point=$(vagrant ssh -c 'mount' | grep prl_fs | awk '{ print $3 }')
mount_point=$(vagrant ssh -c 'mount' | grep 'tests/parallels.*prl_fs' | awk '{ print $3 }')
[ $(vagrant ssh -c "ls -l ${mount_point}/Vagrantfile | wc -l" -- -n -T) -ge 1 ]
}

Expand All @@ -55,7 +55,7 @@ DOCKER_TARGET_VERSION=1.9.0
@test "Default synced folder is shared via NFS if B2D_NFS_SYNC is set" {
export B2D_NFS_SYNC=1
vagrant reload
mount_point=$(vagrant ssh -c 'mount' | grep nfs | awk '{ print $3 }')
mount_point=$(vagrant ssh -c 'mount' | grep 'tests/parallels.*nfs' | awk '{ print $3 }')
[ $(vagrant ssh -c "ls -l $mount_point/Vagrantfile | wc -l" -- -n -T) -ge 1 ]
unset B2D_NFS_SYNC
}
Expand Down
4 changes: 2 additions & 2 deletions tests/virtualbox/boot2docker_vagrant_virtualbox.bats
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ DOCKER_TARGET_VERSION=1.9.0
}

@test "We have a default synced folder thru vboxsf instead of NFS" {
mount_point=$(vagrant ssh -c 'mount' | grep vboxsf | awk '{ print $3 }')
mount_point=$(vagrant ssh -c 'mount' | grep 'tests/virtualbox.*vboxsf' | awk '{ print $3 }')
[ $(vagrant ssh -c "ls -l ${mount_point}/Vagrantfile | wc -l" -- -n -T) -ge 1 ]
}

@test "We have a NFS synced folder if B2D_NFS_SYNC is set (admin password required, will fail on Windows)" {
export B2D_NFS_SYNC=1
vagrant reload
mount_point=$(vagrant ssh -c 'mount' | grep nfs | awk '{ print $3 }')
mount_point=$(vagrant ssh -c 'mount' | grep 'tests/virtualbox.*nfs' | awk '{ print $3 }')
[ $(vagrant ssh -c "ls -l $mount_point/Vagrantfile | wc -l" -- -n -T) -ge 1 ]
unset B2D_NFS_SYNC
}
Expand Down

0 comments on commit c40c0b1

Please sign in to comment.