@@ -11,6 +11,7 @@ export DEFAULT_MEMSIZE=1024
1111export DEFAULT_DISKSIZE=20000
1212export CUSTOM_MEMSIZE=1536
1313export CUSTOM_DISKSIZE=10000
14+ export CUSTOM_CPUCOUNT=1
1415export BAD_URL=" http://dev.null:9111/bad.iso"
1516
1617function setup() {
@@ -31,6 +32,10 @@ findMemorySize() {
3132 run bash -c " VBoxManage showvminfo --machinereadable $NAME | grep memory= | cut -d'=' -f2"
3233}
3334
35+ findCPUCount () {
36+ run bash -c " VBoxManage showvminfo --machinereadable $NAME | grep cpus= | cut -d'=' -f2"
37+ }
38+
3439@test " $DRIVER : machine should not exist" {
3540 run machine active $NAME
3641 [ " $status " -eq 1 ]
@@ -56,7 +61,7 @@ findMemorySize() {
5661 [[ ${output} == " ${DEFAULT_MEMSIZE} " ]]
5762}
5863
59- @test " $DRIVER : dheck default machine disksize" {
64+ @test " $DRIVER : check default machine disksize" {
6065 findDiskSize
6166 [[ ${output} == * " $DEFAULT_DISKSIZE " * ]]
6267}
@@ -244,8 +249,8 @@ findMemorySize() {
244249 [ " $status " -eq 0 ]
245250}
246251
247- @test " $DRIVER : create with custom disk and memory size flags" {
248- run machine create -d $DRIVER --virtualbox-disk-size $CUSTOM_DISKSIZE --virtualbox-memory $CUSTOM_MEMSIZE $NAME
252+ @test " $DRIVER : create with custom disk, cpu count and memory size flags" {
253+ run machine create -d $DRIVER --virtualbox-cpu-count $CUSTOM_CPUCOUNT --virtualbox- disk-size $CUSTOM_DISKSIZE --virtualbox-memory $CUSTOM_MEMSIZE $NAME
249254 [ " $status " -eq 0 ]
250255}
251256
@@ -259,6 +264,11 @@ findMemorySize() {
259264 [[ ${output} == * " $CUSTOM_DISKSIZE " * ]]
260265}
261266
267+ @test " $DRIVER : check custom machine cpucount" {
268+ findCPUCount
269+ [[ ${output} == " ${CUSTOM_CPUCOUNT} " ]]
270+ }
271+
262272@test " $DRIVER : machine should show running after create" {
263273 run machine ls
264274 [ " $status " -eq 0 ]
0 commit comments