Skip to content

Commit cb99e15

Browse files
authored
Merge pull request #938 from henrywang/update_integration
test: Remove tmt bootc plugin code and use released bootc plugin
2 parents 3ead145 + 3aada94 commit cb99e15

13 files changed

+95
-86
lines changed

.packit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ jobs:
6565
targets:
6666
- fedora-41-x86_64
6767
- fedora-41-aarch64
68-
tmt_plan: /integration-build
68+
tmt_plan: /integration
6969
skip_build: true
7070
identifier: integration-test

hack/provision-derived.sh

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
set -xeu
3-
variant=$1
43
# I'm a big fan of nushell for interactive use, and I want to support
54
# using it in our test suite because it's better than bash. First,
65
# enable EPEL to get it.
@@ -15,35 +14,4 @@ mkdir -p ~/.config/nushell
1514
echo '$env.config = { show_banner: false, }' > ~/.config/nushell/config.nu
1615
touch ~/.config/nushell/env.nu
1716
dnf -y install nu
18-
# And we also add pytest, to support running tests written in Python
19-
dnf -y install python3-pytest
20-
case "$variant" in
21-
tmt)
22-
# tmt wants rsync
23-
dnf -y install cloud-init rsync
24-
ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants
25-
26-
# tmt puts scrips in /var/lib/tmt/scripts, add them to $PATH
27-
touch /etc/environment
28-
echo "export PATH=$PATH:/var/lib/tmt/scripts" >> /etc/environment
29-
30-
# tmt needs a webserver to verify the VM is running
31-
TESTCLOUD_GUEST="python3 -m http.server 10022 || python -m http.server 10022 || /usr/libexec/platform-python -m http.server 10022 || python2 -m SimpleHTTPServer 10022 || python -m SimpleHTTPServer 10022"
32-
echo "$TESTCLOUD_GUEST" >> /opt/testcloud-guest.sh
33-
chmod +x /opt/testcloud-guest.sh
34-
echo "[Unit]" >> /etc/systemd/system/testcloud.service
35-
echo "Description=Testcloud guest integration" >> /etc/systemd/system/testcloud.service
36-
echo "After=cloud-init.service" >> /etc/systemd/system/testcloud.service
37-
echo "[Service]" >> /etc/systemd/system/testcloud.service
38-
echo "ExecStart=/bin/bash /opt/testcloud-guest.sh" >> /etc/systemd/system/testcloud.service
39-
echo "[Install]" >> /etc/systemd/system/testcloud.service
40-
echo "WantedBy=multi-user.target" >> /etc/systemd/system/testcloud.service
41-
systemctl enable testcloud.service
42-
;;
43-
"") echo "No variant"
44-
;;
45-
*)
46-
echo "Unknown variant: $1" exit 1
47-
;;
48-
esac
4917
dnf clean all && rm /var/log/* -rf

plans/integration-build.fmf

Lines changed: 0 additions & 27 deletions
This file was deleted.

plans/integration.fmf

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
provision:
2+
hardware:
3+
cpu:
4+
processors: ">= 2"
5+
memory: ">= 6 GB"
6+
virtualization:
7+
is-supported: true
8+
prepare:
9+
- how: install
10+
package:
11+
- git
12+
- podman
13+
- skopeo
14+
- tmt+provision-virtual
15+
- tmt+provision-bootc
16+
- how: shell
17+
script: |
18+
systemctl start libvirtd
19+
systemctl status libvirtd
20+
environment:
21+
TMT_VERBOSE: 1
22+
execute:
23+
how: tmt
24+
discover:
25+
how: fmf
26+
test:
27+
- /integration
28+
finish:
29+
how: shell
30+
script:
31+
# move all tmt plan logs to tmt plan data folder
32+
- mkdir -p $TMT_PLAN_DATA/test-tmt-log
33+
- cp -r /var/tmp/tmt/run-* $TMT_PLAN_DATA/test-tmt-log

plans/test-01-readonly.fmf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Run this via `make test-tmt` which will build a container,
2-
# and a disk image from it.
31
provision:
4-
how: virtual
5-
# Generated by make test-tmt
6-
image: file://./target/testvm/disk.qcow2
2+
how: bootc
3+
add-tmt-dependencies: true
4+
container-file: hack/Containerfile
5+
container-file-workdir: .
6+
image-builder: quay.io/centos-bootc/bootc-image-builder:latest
77
disk: 20
88
summary: Execute booted readonly/nondestructive tests
99
execute:

plans/test-20-local-upgrade.fmf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#
21
provision:
3-
how: virtual
4-
# Generated by make test-tmt
5-
image: file://./target/testvm/disk.qcow2
2+
how: bootc
3+
add-tmt-dependencies: true
4+
container-file: hack/Containerfile
5+
container-file-workdir: .
6+
image-builder: quay.io/centos-bootc/bootc-image-builder:latest
67
disk: 20
78
summary: Execute local upgrade tests
89
execute:

plans/test-21-logically-bound-switch.fmf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#
21
provision:
3-
how: virtual
4-
# Generated by make test-tmt
5-
image: file://./target/testvm/disk.qcow2
2+
how: bootc
3+
add-tmt-dependencies: true
4+
container-file: hack/Containerfile
5+
container-file-workdir: .
6+
image-builder: quay.io/centos-bootc/bootc-image-builder:latest
67
disk: 20
78
summary: Execute logically bound images tests for switching images
89
execute:

plans/test-22-logically-bound-install.fmf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
provision:
22
how: bootc
3-
add-tmt-dependencies: false
3+
add-tmt-dependencies: true
44
container-file: tests/containerfiles/lbi/Containerfile
5-
container-file-workdir: tests/containerfiles/lbi
5+
container-file-workdir: .
6+
image-builder: quay.io/centos-bootc/bootc-image-builder:latest
67
disk: 20
78
summary: Execute logically bound images tests for installing image
89
execute:

plans/test-23-install-outside-container.fmf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
provision:
2-
how: virtual
3-
# Generated by make test-tmt
4-
image: file://./target/testvm/disk.qcow2
2+
how: bootc
3+
add-tmt-dependencies: true
4+
container-file: hack/Containerfile
5+
container-file-workdir: .
6+
image-builder: quay.io/centos-bootc/bootc-image-builder:latest
57
disk: 20
68
summary: Execute tests for installing outside of a container
79
execute:

tests-integration/build-image.fmf

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)