Skip to content

Commit 98b62ff

Browse files
committed
test: run all podman in root mode with sudo
Signed-off-by: Xiaofeng Wang <[email protected]>
1 parent 45304e3 commit 98b62ff

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

.packit.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,21 @@ actions:
3030
- bash -c "ls -al contrib/packaging/"
3131

3232
jobs:
33+
# Only add CS10 and RHEL-9 RPM build test
34+
# But no e2e test on CS10 and RHEL-9
3335
- job: copr_build
3436
trigger: pull_request
3537
targets:
3638
- centos-stream-9-x86_64
3739
- centos-stream-9-aarch64
40+
- centos-stream-10-aarch64
41+
- centos-stream-10-x86_64
3842
- fedora-40-x86_64
3943
- fedora-40-aarch64
44+
- fedora-41-x86_64
45+
- fedora-41-aarch64
46+
- rhel-9-x86_64
47+
- rhel-9-aarch64
4048

4149
- job: tests
4250
trigger: pull_request
@@ -53,7 +61,7 @@ jobs:
5361
- centos-stream-9-x86_64
5462
- centos-stream-9-aarch64
5563
- fedora-40-x86_64
56-
- fedora-40-aarch64
64+
- fedora-41-aarch64
5765
tmt_plan: /to-existing-root
5866
identifier: e2e-test-to-existing-root
5967

@@ -62,7 +70,7 @@ jobs:
6270
targets:
6371
- centos-stream-9-x86_64
6472
- centos-stream-9-aarch64
65-
- fedora-40-x86_64
6673
- fedora-40-aarch64
74+
- fedora-41-x86_64
6775
tmt_plan: /to-disk
6876
identifier: e2e-test-to-disk

plans/e2e.fmf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
discover:
22
how: fmf
33
test: e2e
4-
adjust+:
4+
adjust:
55
- when: arch == x86_64 or arch == aarch64
66
provision:
77
hardware:

tests/e2e/bootc-install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ sudo cp "${TEMPDIR}/domain.crt" "/etc/pki/ca-trust/source/anchors/${REGISTRY_IP}
7777
sudo update-ca-trust
7878

7979
greenprint "Deploy local registry"
80-
podman run \
80+
sudo podman run \
8181
-d \
8282
--name registry \
8383
--replace \
@@ -87,7 +87,7 @@ podman run \
8787
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
8888
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
8989
quay.io/bootc-test/registry:2.8.3
90-
podman ps -a
90+
sudo podman ps -a
9191

9292
# Test image URL
9393
TEST_IMAGE_NAME="bootc-workflow-test"
@@ -136,10 +136,10 @@ cat "$INSTALL_CONTAINERFILE"
136136

137137
# Build test bootc image and push to local registry
138138
greenprint "Build $TEST_OS installation container image"
139-
podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$INSTALL_CONTAINERFILE" "$TEMPDIR"
139+
sudo podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$INSTALL_CONTAINERFILE" "$TEMPDIR"
140140

141141
greenprint "Push $TEST_OS installation container image"
142-
retry podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"
142+
retry sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"
143143

144144
# Prepare Ansible inventory file and ansible.cfg
145145
greenprint "Prepare inventory file"
@@ -251,10 +251,10 @@ EOF
251251

252252
# Build upgrade container image and push to locay registry
253253
greenprint "Build $TEST_OS upgrade container image"
254-
podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$UPGRADE_CONTAINERFILE" .
254+
sudo podman build --tls-verify=false --retry=5 --retry-delay=10 -t "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" -f "$UPGRADE_CONTAINERFILE" .
255255

256256
greenprint "Push $TEST_OS upgrade container image"
257-
retry podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"
257+
retry sudo podman push --tls-verify=false --quiet "${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}" "$TEST_IMAGE_URL"
258258

259259
# Copy upgrade image to local folder for bootc switch test
260260
if [[ "$AIR_GAPPED_DIR" != "" ]]; then

tests/e2e/playbooks/templates/user-data.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ users:
77
lock_passwd: true
88
ssh_authorized_keys:
99
- {{ lookup('ansible.builtin.file', ssh_key_pub) }}
10+
11+
# install with --cloud-init always shutdown vm on the first reboot
12+
# https://github.com/virt-manager/virt-manager/issues/497
13+
# workaround is shutdown vm in cloud-init when cloud-init finished
14+
# then start vm
1015
power_state:
1116
delay: now
1217
mode: poweroff

0 commit comments

Comments
 (0)