Skip to content

Commit

Permalink
Merge branch 'docker-1.9.0' into parallels
Browse files Browse the repository at this point in the history
* docker-1.9.0:
  Fix acceptance tests
  Update to Docker 1.9.0

Conflicts:
	tests/parallels/boot2docker_vagrant_parallels.bats
  • Loading branch information
legal90 committed Nov 4, 2015
2 parents d8ea7d8 + c40c0b1 commit eea3916
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BOOT2DOCKER_VERSION := 1.8.2
BOOT2DOCKER_VERSION := 1.9.0

B2D_ISO_FILE := boot2docker.iso
B2D_ISO_URL := https://github.com/boot2docker/boot2docker/releases/download/v$(BOOT2DOCKER_VERSION)/boot2docker.iso
B2D_ISO_CHECKSUM := 29839aeef97758e142eae4c2fd10890b
B2D_ISO_CHECKSUM := ad49cdb394754148f096cc2c9f22970b

all: parallels virtualbox

Expand Down
29 changes: 10 additions & 19 deletions tests/parallels/boot2docker_vagrant_parallels.bats
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env bats

DOCKER_TARGET_VERSION=1.8.2
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 @@ -39,14 +39,9 @@ DOCKER_TARGET_VERSION=1.8.2
vagrant reload
}

@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 "Default synced folder is shared via prl_fs" {
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 ]
}

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

@test "Reload VM with enabled B2D_NFS_SYNC" {
@test "Default synced folder is shared via NFS if B2D_NFS_SYNC is set" {
export B2D_NFS_SYNC=1
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
vagrant reload
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
}

@test "Default synced folder can be shared via rsync" {
Expand Down
6 changes: 3 additions & 3 deletions tests/virtualbox/boot2docker_vagrant_virtualbox.bats
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
vagrant ssh -c 'docker ps'
}

DOCKER_TARGET_VERSION=1.8.2
DOCKER_TARGET_VERSION=1.9.0
@test "Docker is version DOCKER_TARGET_VERSION=${DOCKER_TARGET_VERSION}" {
DOCKER_VERSION=$(vagrant ssh -c "docker version --format '{{.Server.Version}}'" -- -n -T)
[ "${DOCKER_VERSION}" == "${DOCKER_TARGET_VERSION}" ]
Expand All @@ -52,14 +52,14 @@ DOCKER_TARGET_VERSION=1.8.2
}

@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 eea3916

Please sign in to comment.