Skip to content

Commit

Permalink
Packit: enable podman e2e tests and EL testing
Browse files Browse the repository at this point in the history
This commit enables podman's e2e tests and also enables testing for
epel 8 and 9 environments.

The test scripts are replaced by inline scripting in the fmf file itself
making it much easier to maintain.

Signed-off-by: Lokesh Mandvekar <[email protected]>
  • Loading branch information
lsm5 committed Oct 4, 2023
1 parent 1a74da5 commit 9bd61cf
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 51 deletions.
30 changes: 19 additions & 11 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
message: "Ephemeral COPR build failed. @containers/packit-build please check."
enable_net: true
# container-selinux is noarch so we only need to test on one arch
targets: &pr_copr_targets
targets:
- fedora-all
- centos-stream-9
- centos-stream-8
- fedora-eln
- epel-9
- epel-8

# Run on commit to main branch
- job: copr_build
Expand All @@ -33,17 +34,24 @@ jobs:
enable_net: true

# All tests specified in the `/plans/` subdir
# FIXME: uncomment e2e tests after disk space issues resolved on testing farm
#- job: tests
# trigger: pull_request
# targets: *test_targets
# identifier: podman_e2e_test
# tmt_plan: "/plans/podman_e2e_test"
- job: tests
trigger: pull_request
notifications:
failure_comment:
message: "podman e2e tests failed. @containers/packit-build please check."
targets: &pr_test_targets
- fedora-all
- epel-9
- epel-8
identifier: podman_e2e_test
tmt_plan: "/plans/podman_e2e_test"

- job: tests
trigger: pull_request
# arch assumed to be x86_64 by default.
targets: *pr_copr_targets
notifications:
failure_comment:
message: "podman system tests failed. @containers/packit-build please check."
targets: *pr_test_targets
identifier: podman_system_test
tmt_plan: "/plans/podman_system_test"

Expand Down
17 changes: 0 additions & 17 deletions plans/common_setup.sh

This file was deleted.

38 changes: 36 additions & 2 deletions plans/main.fmf
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
prepare:
- name: Disable testing-farm dnf repos
how: shell
script: |
if [[ ! -f /etc/centos-release || $(rpm --eval %{?fedora}) > 37 ]]; then
dnf config-manager --disable testing-farm-tag-repository
fi
- name: Install packages
how: install
copr: rhcontainerbot/podman-next
package:
- bats
- golang
- podman
- podman-tests

/podman_e2e_test:
summary: Run SELinux specific Podman e2e tests
execute:
how: tmt
script: bash plans/podman_e2e_test.sh
script: |
echo "Checking installed versions of golang, podman and podman-tests..."
rpm -q golang podman podman-tests
if [ -f /etc/fedora-release ]; then
echo "Resizing tmpfs..."
mount -o remount,size=10G /tmp
fi
echo "Fetching podman srpm from copr..."
dnf --disablerepo=* --enablerepo=copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next download --source podman
echo "Extracting podman source from srpm..."
rpm2cpio podman*.src.rpm | cpio -di
tar zxf podman-*-dev.tar.gz
echo "Running podman e2e tests..."
cd podman-*-dev/test/e2e
PODMAN_BINARY=/usr/bin/podman go test -v config.go config_amd64.go common_test.go libpod_suite_test.go run_selinux_test.go

/podman_system_test:
summary: Run SELinux specific Podman system tests
execute:
how: tmt
script: bash plans/podman_system_test.sh
script: |
echo "Checking versions of podman and podman-tests..."
rpm -q podman podman-tests
echo "Running podman system tests..."
bats /usr/bin/podman /usr/share/podman/test/system/410-selinux.bats
14 changes: 0 additions & 14 deletions plans/podman_e2e_test.sh

This file was deleted.

7 changes: 0 additions & 7 deletions plans/podman_system_test.sh

This file was deleted.

0 comments on commit 9bd61cf

Please sign in to comment.