test/system: Add tests for failures for 'root'

https://github.com/containers/toolbox/pull/915
This commit is contained in:
Ondřej Míchal 2021-11-07 15:09:49 +02:00
parent a7e7e0ac2b
commit ca899c8a56
1 changed files with 22 additions and 0 deletions

22
test/system/100-root.bats Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env bats
load 'libs/bats-support/load'
load 'libs/bats-assert/load'
load 'libs/helpers'
setup() {
check_xdg_runtime_dir
cleanup_containers
}
teardown() {
cleanup_containers
}
@test "root: Try to enter the default container with no containers created" {
run $TOOLBOX <<< "n"
assert_success
assert_line --index 0 "No toolbox containers found. Create now? [y/N] A container can be created later with the 'create' command."
assert_line --index 1 "Run 'toolbox --help' for usage."
}