Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
legal90 committed Jul 15, 2015
1 parent b3312a5 commit 9a49b5d
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions tests/parallels/boot2docker_vagrant_parallels.bats
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ DOCKER_TARGET_VERSION=1.7.1
vagrant reload
}

@test "Default synced folder is shared via prl_fs" {
mount_point=$(vagrant ssh -c 'mount' | grep prl_fs | awk '{ print $3 }')
[ $(vagrant ssh -c "ls -l ${mount_point}/Vagrantfile | wc -l" -- -n -T) -ge 1 ]
@test "'/Users' and '.' synced folders are shared via prl_fs" {
run vagrant ssh -c 'mount | grep prl_fs'
[ "$status" -eq 0 ]
[ $(expr "${lines[0]}" : ".*on /Users") -ne 0 ]
[ $(expr "${lines[1]}" : ".*on /vagrant") -ne 0 ]

run vagrant ssh -c "ls -l /vagrant/Vagrantfile"
[ "$status" -eq 0 ]
}

@test "Rsync is installed in the VM" {
Expand All @@ -52,12 +57,16 @@ DOCKER_TARGET_VERSION=1.7.1
[ $(vagrant ssh -c 'ps aux | grep rpc.statd | wc -l' -- -n -T) -ge 1 ]
}

@test "Default synced folder is shared via NFS if B2D_NFS_SYNC is set" {
@test "Reload VM with enabled B2D_NFS_SYNC" {
export B2D_NFS_SYNC=1
vagrant reload
mount_point=$(vagrant ssh -c 'mount' | grep nfs | awk '{ print $3 }')
[ $(vagrant ssh -c "ls -l $mount_point/Vagrantfile | wc -l" -- -n -T) -ge 1 ]
unset B2D_NFS_SYNC
run vagrant reload
}

@test "'/Users' synced folder is shared via NFS" {
run vagrant ssh -c 'mount | grep nfs'
[ "$status" -eq 0 ]
[ $(expr "${lines[0]}" : ".*on /Users") -ne 0 ]
unset B2D_NFS_SYNC
}

@test "Default synced folder can be shared via rsync" {
Expand All @@ -74,5 +83,4 @@ DOCKER_TARGET_VERSION=1.7.1
@test "destroy and cleanup" {
vagrant destroy -f
vagrant box remove boot2docker-parallels-test
rm -rf ./tls/
}

0 comments on commit 9a49b5d

Please sign in to comment.