Skip to content

Commit

Permalink
playbooks, test/system: Drop the PODMAN and SKOPEO environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
debarshiray committed Nov 11, 2024
1 parent b443428 commit 1e9c1b6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
1 change: 0 additions & 1 deletion playbooks/system-test-commands-options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
- name: Run the commands-options system tests
command: bats --filter-tags commands-options ./test/system
environment:
PODMAN: '/usr/bin/podman'
TMPDIR: '/var/tmp'
TOOLBX: '/usr/local/bin/toolbox'
TOOLBX_TEST_SYSTEM_TAGS: 'arch-fedora,commands-options,custom-image,ubuntu'
Expand Down
1 change: 0 additions & 1 deletion playbooks/system-test-runtime-environment-arch-fedora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
- name: Run the (arch-fedora,runtime-environment) system tests
command: bats --filter-tags arch-fedora,runtime-environment ./test/system
environment:
PODMAN: '/usr/bin/podman'
TMPDIR: '/var/tmp'
TOOLBX: '/usr/local/bin/toolbox'
TOOLBX_TEST_SYSTEM_TAGS: 'arch-fedora,runtime-environment'
Expand Down
1 change: 0 additions & 1 deletion playbooks/system-test-runtime-environment-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
- name: Run the (runtime-environment,ubuntu) system tests
command: bats --filter-tags runtime-environment,ubuntu ./test/system
environment:
PODMAN: '/usr/bin/podman'
TMPDIR: '/var/tmp'
TOOLBX: '/usr/local/bin/toolbox'
TOOLBX_TEST_SYSTEM_TAGS: 'runtime-environment,ubuntu'
Expand Down
14 changes: 7 additions & 7 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ teardown() {
assert_output --partial "Created container: ubuntu-toolbox-16.04"
assert_output --partial "Enter with: toolbox enter ubuntu-toolbox-16.04"

run $PODMAN ps --all
run podman ps --all

assert_success
assert_output --regexp "Created[[:blank:]]+ubuntu-toolbox-16.04"
Expand All @@ -219,7 +219,7 @@ teardown() {
assert_output --partial "Created container: ubuntu-toolbox-18.04"
assert_output --partial "Enter with: toolbox enter ubuntu-toolbox-18.04"

run $PODMAN ps --all
run podman ps --all

assert_success
assert_output --regexp "Created[[:blank:]]+ubuntu-toolbox-18.04"
Expand All @@ -234,7 +234,7 @@ teardown() {
assert_output --partial "Created container: ubuntu-toolbox-20.04"
assert_output --partial "Enter with: toolbox enter ubuntu-toolbox-20.04"

run $PODMAN ps --all
run podman ps --all

assert_success
assert_output --regexp "Created[[:blank:]]+ubuntu-toolbox-20.04"
Expand All @@ -251,7 +251,7 @@ teardown() {
assert [ ${#lines[@]} -eq 2 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

run $PODMAN ps --all
run podman ps --all

assert_success
assert_output --regexp "Created[[:blank:]]+$image"
Expand All @@ -268,7 +268,7 @@ teardown() {
assert [ ${#lines[@]} -eq 2 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

run $PODMAN ps --all
run podman ps --all

assert_success
assert_output --regexp "Created[[:blank:]]+non-default"
Expand All @@ -285,7 +285,7 @@ teardown() {
assert [ ${#lines[@]} -eq 2 ]
assert [ ${#stderr_lines[@]} -eq 0 ]

run $PODMAN ps --all
run podman ps --all

assert_success
assert_output --regexp "Created[[:blank:]]+non-default"
Expand Down Expand Up @@ -842,7 +842,7 @@ teardown() {
local authfile="$BATS_TEST_TMPDIR/authfile"
local image="fedora-toolbox:34"

run $PODMAN login --authfile "$authfile" --username user --password user "$DOCKER_REG_URI"
run podman login --authfile "$authfile" --username user --password user "$DOCKER_REG_URI"
assert_success

run "$TOOLBX" --assumeyes create --image "$DOCKER_REG_URI/$image"
Expand Down
6 changes: 3 additions & 3 deletions test/system/102-list.bats
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ teardown() {
num_of_images="$(list_images)"
assert_equal "$num_of_images" 1

$PODMAN create --name busybox-container "$busybox_image"
podman create --name busybox-container "$busybox_image"

local num_of_containers
num_of_containers="$(list_containers)"
Expand All @@ -494,7 +494,7 @@ teardown() {
num_of_images="$(list_images)"
assert_equal "$num_of_images" 1

$PODMAN create --name busybox-container "$busybox_image"
podman create --name busybox-container "$busybox_image"

local num_of_containers
num_of_containers="$(list_containers)"
Expand All @@ -517,7 +517,7 @@ teardown() {
num_of_images="$(list_images)"
assert_equal "$num_of_images" 1

$PODMAN create --name busybox-container "$busybox_image"
podman create --name busybox-container "$busybox_image"

local num_of_containers
num_of_containers="$(list_containers)"
Expand Down
12 changes: 6 additions & 6 deletions test/system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ and to speed up the cases.
By default the test suite uses the system versions of `podman`, `skopeo` and
`toolbox`.

If you have a `podman`, `skopeo` or `toolbox` installed in a nonstandard
location then you can use the `PODMAN`, `SKOPEO` and `TOOLBX` environmental
variables to set the path to the binaries. So the command to invoke the test
suite could look something like this: `PODMAN=/usr/libexec/podman TOOLBX=./toolbox bats ./test/system/`.
If you have `toolbox` installed in a nonstandard location then you can use the
`TOOLBX` environmental variable to set the path to the binary. So the command
to invoke the test suite could look something like this:
`TOOLBX=./toolbox bats ./test/system/`.

It's recommended to set the [TMPDIR](https://systemd.io/TEMPORARY_DIRECTORIES/)
environment variable to `/var/tmp` when running the tests. Otherwise, the
Expand Down Expand Up @@ -90,6 +90,6 @@ Examples:
Example pull of the `fedora-toolbox:34` image:

```bash
$PODMAN login --username user --password user "$DOCKER_REG_URI"
$PODMAN pull "$DOCKER_REG_URI/fedora-toolbox:34"
podman login --username user --password user "$DOCKER_REG_URI"
podman pull "$DOCKER_REG_URI/fedora-toolbox:34"
```

0 comments on commit 1e9c1b6

Please sign in to comment.