Skip to content

Commit

Permalink
test/system: Remove unnecessary --assumeyes
Browse files Browse the repository at this point in the history
It shouldn't be necessary to use the --assumeyes option when creating a
Toolbx container, if the corresponding image is already present in the
local containers/storage image store.  It's harmful to test it with the
option, even when it shouldn't be needed, because it's off by default
and most users won't enable it.

Therefore, it's better to test the most common scenario that most users
will encounter.

#1595
  • Loading branch information
debarshiray committed Nov 14, 2024
1 parent fbffd45 commit 91c5396
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ teardown() {

pull_default_image

run "$TOOLBX" --assumeyes create
run "$TOOLBX" create

assert_success
assert_line --index 0 "Created container: $default_container"
Expand Down Expand Up @@ -128,7 +128,7 @@ teardown() {
@test "create: Arch Linux" {
pull_distro_image arch latest

run "$TOOLBX" --assumeyes create --distro arch
run "$TOOLBX" create --distro arch

assert_success
assert_output --partial "Created container: arch-toolbox-latest"
Expand All @@ -142,7 +142,7 @@ teardown() {
@test "create: Arch Linux ('--release latest')" {
pull_distro_image arch latest

run "$TOOLBX" --assumeyes create --distro arch --release latest
run "$TOOLBX" create --distro arch --release latest

assert_success
assert_output --partial "Created container: arch-toolbox-latest"
Expand All @@ -156,7 +156,7 @@ teardown() {
@test "create: Arch Linux ('--release rolling')" {
pull_distro_image arch latest

run "$TOOLBX" --assumeyes create --distro arch --release rolling
run "$TOOLBX" create --distro arch --release rolling

assert_success
assert_output --partial "Created container: arch-toolbox-latest"
Expand All @@ -170,7 +170,7 @@ teardown() {
@test "create: Fedora 34" {
pull_distro_image fedora 34

run "$TOOLBX" --assumeyes create --distro fedora --release f34
run "$TOOLBX" create --distro fedora --release f34

assert_success
assert_output --partial "Created container: fedora-toolbox-34"
Expand All @@ -184,7 +184,7 @@ teardown() {
@test "create: RHEL 8.10" {
pull_distro_image rhel 8.10

run "$TOOLBX" --assumeyes create --distro rhel --release 8.10
run "$TOOLBX" create --distro rhel --release 8.10

assert_success
assert_output --partial "Created container: rhel-toolbox-8.10"
Expand All @@ -198,7 +198,7 @@ teardown() {
@test "create: Ubuntu 16.04" {
pull_distro_image ubuntu 16.04

run "$TOOLBX" --assumeyes create --distro ubuntu --release 16.04
run "$TOOLBX" create --distro ubuntu --release 16.04

assert_success
assert_output --partial "Created container: ubuntu-toolbox-16.04"
Expand All @@ -213,7 +213,7 @@ teardown() {
@test "create: Ubuntu 18.04" {
pull_distro_image ubuntu 18.04

run "$TOOLBX" --assumeyes create --distro ubuntu --release 18.04
run "$TOOLBX" create --distro ubuntu --release 18.04

assert_success
assert_output --partial "Created container: ubuntu-toolbox-18.04"
Expand All @@ -228,7 +228,7 @@ teardown() {
@test "create: Ubuntu 20.04" {
pull_distro_image ubuntu 20.04

run "$TOOLBX" --assumeyes create --distro ubuntu --release 20.04
run "$TOOLBX" create --distro ubuntu --release 20.04

assert_success
assert_output --partial "Created container: ubuntu-toolbox-20.04"
Expand All @@ -243,7 +243,7 @@ teardown() {
@test "create: With a custom image without a name" {
image="$(build_image_without_name)"

run --keep-empty-lines --separate-stderr "$TOOLBX" --assumeyes create --image "$image"
run --keep-empty-lines --separate-stderr "$TOOLBX" create --image "$image"

assert_success
assert_line --index 0 "Created container: $image"
Expand All @@ -260,7 +260,7 @@ teardown() {
@test "create: With a custom image without a name, and container name (using positional argument)" {
image="$(build_image_without_name)"

run --keep-empty-lines --separate-stderr "$TOOLBX" --assumeyes create --image "$image" non-default
run --keep-empty-lines --separate-stderr "$TOOLBX" create --image "$image" non-default

assert_success
assert_line --index 0 "Created container: non-default"
Expand All @@ -277,7 +277,7 @@ teardown() {
@test "create: With a custom image without a name, and container name (using option --container)" {
image="$(build_image_without_name)"

run --keep-empty-lines --separate-stderr "$TOOLBX" --assumeyes create --image "$image" --container non-default
run --keep-empty-lines --separate-stderr "$TOOLBX" create --image "$image" --container non-default

assert_success
assert_line --index 0 "Created container: non-default"
Expand Down

0 comments on commit 91c5396

Please sign in to comment.