Skip to content

Commit ca7816e

Browse files
committed
test: Update to work with OSCI gating test
Signed-off-by: Xiaofeng Wang <[email protected]>
1 parent 1c13b93 commit ca7816e

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

hack/os-image-map.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"base": {
3+
"rhel-10.2": "images.paas.redhat.com/bootc/rhel-bootc:latest-10.2",
4+
"rhel-9.8": "images.paas.redhat.com/bootc/rhel-bootc:latest-9.8",
35
"centos-9": "quay.io/centos-bootc/centos-bootc:stream9",
46
"centos-10": "quay.io/centos-bootc/centos-bootc:stream10",
57
"fedora-42": "quay.io/fedora/fedora-bootc:42",

tmt/tests/booted/test-soft-reboot-selinux-policy.nu

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,30 @@ def initial_build [] {
3232

3333
bootc image copy-to-storage
3434

35+
# copy-to-storage does not copy repo file
36+
# but OSCI gating test needs repo to install package
37+
let os = open /usr/lib/os-release
38+
| lines
39+
| filter {|l| $l != "" and not ($l | str starts-with "#") }
40+
| parse "{key}={value}"
41+
| reduce {|it, acc|
42+
$acc | upsert $it.key ($it.value | str trim -c '"')
43+
}
44+
mut repo_copy = ""
45+
46+
if $os.ID == "rhel" {
47+
cp /etc/yum.repos.d/rhel.repo .
48+
$repo_copy = "COPY rhel.repo /etc/yum.repos.d/"
49+
}
50+
3551
# Create a derived container that installs a custom SELinux policy module
3652
# Installing a policy module will change the compiled policy checksum
3753
# Following Colin's suggestion and the composefs-rs example
3854
# We create a minimal policy module and install it
39-
"FROM localhost/bootc
55+
$"
56+
FROM localhost/bootc
57+
($repo_copy)
58+
4059
# Install tools needed to build and install SELinux policy modules
4160
RUN dnf install -y selinux-policy-devel checkpolicy policycoreutils
4261

0 commit comments

Comments
 (0)