Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ubuntu-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
bash-completion \
codespell \
fish \
flatpak \
gcc \
go-md2man \
golang-1.20 \
Expand Down Expand Up @@ -156,7 +157,8 @@ jobs:
test/system/108-completion.bats \
test/system/201-ipc.bats \
test/system/203-network.bats \
test/system/220-environment-variables.bats
test/system/220-environment-variables.bats \
test/system/501-create.bats
env:
SHELL: /bin/bash
TMPDIR: /var/tmp
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func ForwardToHost() (int, error) {
logrus.Debugf("%s", arg)
}

exitCode, err := shell.RunWithExitCode("flatpak-spawn", os.Stdin, os.Stdout, nil, flatpakSpawnArgs...)
exitCode, err := shell.RunWithExitCode("flatpak-spawn", os.Stdin, os.Stdout, os.Stderr, flatpakSpawnArgs...)
if err != nil {
return exitCode, err
}
Expand Down
8 changes: 2 additions & 6 deletions test/system/002-help.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ load 'libs/bats-assert/load'
load 'libs/helpers.bash'

setup() {
bats_require_minimum_version 1.10.0
_setup_environment
cleanup_all
}
Expand Down Expand Up @@ -104,12 +105,7 @@ teardown() {
assert_line --index 4 "enter Enter an existing Toolbx container"
assert_line --index 5 "list List all existing Toolbx containers and images"
assert_line --index 7 "Go to https://github.com/containers/toolbox for further information."

if check_bats_version 1.10.0; then
assert [ ${#lines[@]} -eq 8 ]
else
assert [ ${#lines[@]} -eq 9 ]
fi
assert [ ${#lines[@]} -eq 8 ]

# shellcheck disable=SC2154
assert [ ${#stderr_lines[@]} -eq 0 ]
Expand Down
26 changes: 4 additions & 22 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ load 'libs/bats-assert/load'
load 'libs/helpers'

setup() {
bats_require_minimum_version 1.7.0
bats_require_minimum_version 1.10.0
_setup_environment
cleanup_all
}
Expand Down Expand Up @@ -234,13 +234,7 @@ teardown() {
assert_success
assert_line --index 0 "Created container: $image"
assert_line --index 1 "Enter with: toolbox enter $image"

if check_bats_version 1.10.0; then
assert [ ${#lines[@]} -eq 2 ]
else
assert [ ${#lines[@]} -eq 3 ]
fi

assert [ ${#lines[@]} -eq 2 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

run $PODMAN ps --all
Expand All @@ -257,13 +251,7 @@ teardown() {
assert_success
assert_line --index 0 "Created container: non-default"
assert_line --index 1 "Enter with: toolbox enter non-default"

if check_bats_version 1.10.0; then
assert [ ${#lines[@]} -eq 2 ]
else
assert [ ${#lines[@]} -eq 3 ]
fi

assert [ ${#lines[@]} -eq 2 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

run $PODMAN ps --all
Expand All @@ -280,13 +268,7 @@ teardown() {
assert_success
assert_line --index 0 "Created container: non-default"
assert_line --index 1 "Enter with: toolbox enter non-default"

if check_bats_version 1.10.0; then
assert [ ${#lines[@]} -eq 2 ]
else
assert [ ${#lines[@]} -eq 3 ]
fi

assert [ ${#lines[@]} -eq 2 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

run $PODMAN ps --all
Expand Down
Loading