Browse Source

Added tests to check for missing hostnames

pull/6/head
Giovanni Torres 8 years ago
parent
commit
dfae396622
  1. 18
      tests/check_script.bats

18
tests/check_script.bats

@ -8,6 +8,24 @@ VMNAME=batstestvm
[[ "${lines[0]}" =~ "NAME" ]]
}
@test "Test create with no hostname" {
run kvm-install-vm create
[ "$status" -eq 1 ]
[[ "${lines[0]}" =~ "NAME" ]]
}
@test "Test create with options and no hostname" {
run kvm-install-vm create -t debian9 -d 20
[ "$status" -eq 1 ]
[[ "${lines[0]}" =~ "Please specify a single host to create." ]]
}
@test "Test remove with no hostname" {
run kvm-install-vm remove
[ "$status" -eq 1 ]
[[ "${lines[0]}" =~ "NAME" ]]
}
@test "Install VM - $VMNAME" {
run kvm-install-vm create $VMNAME
[ "$status" -eq 0 ]

Loading…
Cancel
Save