toolbox/test/system/102-create.bats
Harry Míchal 5a651eae2f playbooks, test/system: Test the Go implementation and update tests
In the Go implementation, when the 'rm' and 'rmi' commands fail to
remove a container or image, they don't use a non-zero exit code.
There's currently no nice fix for this. So, the tests have been
adjusted as a temporary measure.

https://github.com/containers/toolbox/pull/507
2020-07-21 16:31:50 +02:00

20 lines
638 B
Bash

#!/usr/bin/env bats
load helpers
@test "Create the default container" {
run_toolbox -y create
}
@test "Create a container with a valid custom name ('not-running'; name passed as an argument)" {
run_toolbox -y create "not-running"
}
@test "Create a container with a custom image and name ('running';f29; name passed as an option)" {
run_toolbox -y create -c "running" -i fedora-toolbox:29
}
@test "Try to create a container with invalid custom name" {
run_toolbox 1 -y create "ßpeci@l.Nam€"
is "${lines[0]}" "Error: failed to create container ßpeci@l.Nam€" "Toolbox should fail to create a container with such name"
}