Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CentOS Stream 10 among test images #3435

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ TMT_TEST_CONTAINER_IMAGES := $(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/alpine:late
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/7/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream9:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream9/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream10:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream10/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/coreos:stable \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/coreos/ostree:stable \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/rawhide:latest \
Expand Down Expand Up @@ -144,6 +146,12 @@ $(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/7
$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/7/upstream\:latest:
$(call build-test-container-image,$@,centos/7/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream10\:latest:
$(call build-test-container-image,$@,centos/stream10/Containerfile)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream10/upstream\:latest:
$(call build-test-container-image,$@,centos/stream10/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream9\:latest:
$(call build-test-container-image,$@,centos/stream9/Containerfile)

Expand Down
10 changes: 10 additions & 0 deletions containers/centos/stream10/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# A CentOS Stream 10 image tailored for tmt test suite
#
# tmt/tests/centos/stream10/upstream:latest
#

FROM quay.io/centos/centos:stream10

# Populate dnf cache
RUN dnf makecache
10 changes: 10 additions & 0 deletions containers/centos/stream10/Containerfile.upstream
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# A CentOS Stream 10 image tailored for tmt test suite
#
# tmt/tests/centos/stream10/upstream:latest
#

FROM quay.io/centos/centos:stream10

# Populate dnf cache
RUN dnf makecache
9 changes: 9 additions & 0 deletions tests/images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ _MAKEFILE_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/.."
TEST_CONTAINER_IMAGES="${TEST_CONTAINER_IMAGES:-$TEST_IMAGE_PREFIX/alpine:latest
$TEST_IMAGE_PREFIX/centos/7/upstream:latest
$TEST_IMAGE_PREFIX/centos/stream9/upstream:latest
$TEST_IMAGE_PREFIX/centos/stream10/upstream:latest
$TEST_IMAGE_PREFIX/fedora/39/upstream:latest
$TEST_IMAGE_PREFIX/fedora/40/upstream:latest
$TEST_IMAGE_PREFIX/fedora/41/upstream:latest
Expand All @@ -37,6 +38,7 @@ $TEST_IMAGE_PREFIX/debian/12.7/upstream:latest}"
# TODO: enable Ubuntu
# TODO: enable centos-7 again with modified repo files
TEST_VIRTUAL_IMAGES="${TEST_VIRTUAL_IMAGES:-centos-stream-9
centos-stream-10
fedora-39
fedora-40
fedora-41
Expand Down Expand Up @@ -79,6 +81,13 @@ function is_centos_stream_9 () {
return 1
}

function is_centos_stream_10 () {
[[ "$1" =~ ^.*centos/stream10[:/].* ]] && return 0
[[ "$1" = "centos-stream-10" ]] && return 0

return 1
}

function is_centos_7 () {
[[ "$1" =~ ^.*centos/7[:/].* ]] && return 0
[[ "$1" = "centos-7" ]] && return 0
Expand Down
4 changes: 4 additions & 0 deletions tests/prepare/install/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ rlJournalStart
rlRun "distro=centos-stream-9"
rlRun "package_manager=dnf"

elif is_centos_stream_10 "$image"; then
rlRun "distro=centos-stream-10"
rlRun "package_manager=dnf"

elif is_centos_7 "$image"; then
rlRun "distro=centos-7"
rlRun "package_manager=yum"
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_package_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
url='containers-storage:localhost/tmt/tests/container/fedora/40/upstream:latest')
CONTAINER_FEDORA_39 = Container(
url='containers-storage:localhost/tmt/tests/container/fedora/39/upstream:latest')
CONTAINER_CENTOS_STREAM_10 = Container(
url='containers-storage:localhost/tmt/tests/container/centos/stream10/upstream:latest')
CONTAINER_CENTOS_STREAM_9 = Container(
url='containers-storage:localhost/tmt/tests/container/centos/stream9/upstream:latest')
CONTAINER_CENTOS_7 = Container(
Expand Down Expand Up @@ -148,6 +150,8 @@ def assert_output(
(CONTAINER_FEDORA_39, PACKAGE_MANAGER_YUM),

# CentOS Stream
(CONTAINER_CENTOS_STREAM_10, PACKAGE_MANAGER_DNF),
(CONTAINER_CENTOS_STREAM_10, PACKAGE_MANAGER_YUM),
(CONTAINER_CENTOS_STREAM_9, PACKAGE_MANAGER_DNF),
(CONTAINER_CENTOS_STREAM_9, PACKAGE_MANAGER_YUM),

Expand Down
Loading