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

Commit

Permalink
Parallels driver: Added integration tests for customisation via env vars
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Zholobov <[email protected]>
  • Loading branch information
legal90 committed Apr 1, 2015
1 parent 631c780 commit 1bb4193
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions test/integration/driver-parallels.bats
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ findCPUCount() {
@test "$DRIVER: check custom machine memory size" {
findMemorySize
echo ${output}
[[ ${output} == "${CUSTOM_MEMSIZE}" ]]
[[ ${output} == "$CUSTOM_MEMSIZE" ]]
}

@test "$DRIVER: check custom machine disksize" {
Expand All @@ -235,7 +235,7 @@ findCPUCount() {
@test "$DRIVER: check custom machine cpucount" {
findCPUCount
echo ${output}
[[ ${output} == "${CUSTOM_CPUCOUNT}" ]]
[[ ${output} == "$CUSTOM_CPUCOUNT" ]]
}

@test "$DRIVER: machine should show running after create" {
Expand All @@ -249,6 +249,37 @@ findCPUCount() {
[ "$status" -eq 0 ]
}

@test "$DRIVER: create with custom disk, cpu count and memory size flags via env vars" {
PARALLELS_DISK_SIZE=$CUSTOM_DISKSIZE PARALLELS_CPU_COUNT=$CUSTOM_CPUCOUNT PARALLELS_MEMORY_SIZE=$CUSTOM_MEMSIZE run machine create -d $DRIVER $NAME
[ "$status" -eq 0 ]
}

@test "$DRIVER: check machine's memory size was set correctly by env var" {
findMemorySize
[[ ${output} == "$CUSTOM_MEMSIZE" ]]
}

@test "$DRIVER: check machine's disk size was set correctly by env var" {
findDiskSize
[[ ${output} == *"$CUSTOM_DISKSIZE"* ]]
}

@test "$DRIVER: check custom machine cpucount" {
findCPUCount
[[ ${output} == "$CUSTOM_CPUCOUNT" ]]
}

@test "$DRIVER: machine should show running after create with env" {
run machine ls
[ "$status" -eq 0 ]
[[ ${lines[1]} == *"Running"* ]]
}

@test "$DRIVER: remove after custom env create" {
run machine rm -f $NAME
[ "$status" -eq 0 ]
}

@test "$DRIVER: cleanup" {
run rm -rf $MACHINE_STORAGE_PATH
[ "$status" -eq 0 ]
Expand Down

0 comments on commit 1bb4193

Please sign in to comment.