Skip to content

Commit

Permalink
test/system: Test the output messages when a container is created
Browse files Browse the repository at this point in the history
  • Loading branch information
debarshiray committed Sep 5, 2024
1 parent c6a1de3 commit 76a8508
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ teardown() {
}

@test "create: Smoke test" {
local default_container
default_container="$(get_system_id)-toolbox-$(get_system_version)"

pull_default_image

run "$TOOLBX" --assumeyes create

assert_success
assert_line --index 0 "Created container: $default_container"
assert_line --index 1 "Enter with: toolbox enter"
assert [ ${#lines[@]} -eq 2 ]
}

@test "create: With a custom name (using option --container)" {
Expand All @@ -43,6 +49,9 @@ teardown() {
run "$TOOLBX" create --container "custom-containerName"

assert_success
assert_line --index 0 "Created container: custom-containerName"
assert_line --index 1 "Enter with: toolbox enter custom-containerName"
assert [ ${#lines[@]} -eq 2 ]
}

@test "create: With a custom image and name (using option --container)" {
Expand All @@ -51,6 +60,9 @@ teardown() {
run "$TOOLBX" create --container "fedora34" --image fedora-toolbox:34

assert_success
assert_line --index 0 "Created container: fedora34"
assert_line --index 1 "Enter with: toolbox enter fedora34"
assert [ ${#lines[@]} -eq 2 ]
}

@test "create: Try without --assumeyes" {
Expand Down

0 comments on commit 76a8508

Please sign in to comment.