Skip to content
Merged
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
6 changes: 6 additions & 0 deletions imagestreams/imagestreams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
- name: RHEL 9
app_versions: [13, 15, 16]

- name: RHEL 10
app_versions: [16]

- filename: postgresql-rhel-aarch64.json
latest: "16-el9"
distros:
Expand All @@ -35,3 +38,6 @@

- name: RHEL 9
app_versions: [13, 15, 16]

- name: RHEL 10
app_versions: [16]
18 changes: 18 additions & 0 deletions imagestreams/postgresql-rhel-aarch64.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,24 @@
"type": "Local"
}
},
{
"name": "16-el10",
"annotations": {
"openshift.io/display-name": "PostgreSQL 16 (RHEL 10)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a PostgreSQL 16 database on RHEL 10. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
"iconClass": "icon-postgresql",
"tags": "database,postgresql",
"version": "16"
},
"from": {
"kind": "DockerImage",
"name": "registry.redhat.io/rhel10/postgresql-16:latest"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "latest",
"annotations": {
Expand Down
18 changes: 18 additions & 0 deletions imagestreams/postgresql-rhel.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,24 @@
"type": "Local"
}
},
{
"name": "16-el10",
"annotations": {
"openshift.io/display-name": "PostgreSQL 16 (RHEL 10)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a PostgreSQL 16 database on RHEL 10. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
"iconClass": "icon-postgresql",
"tags": "database,postgresql",
"version": "16"
},
"from": {
"kind": "DockerImage",
"name": "registry.redhat.io/rhel10/postgresql-16:latest"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "latest",
"annotations": {
Expand Down
Empty file added test/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions test/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TAGS = {
"rhel8": "-el8",
"rhel9": "-el9",
"rhel10": "-el10",
}
4 changes: 4 additions & 0 deletions test/pg-test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ get_image_id ()
ns=rhel9
local image=registry.redhat.io/$ns/postgresql-${version}
;;
rhel10)
ns=rhel10
local image=registry.redhat.io/$ns/postgresql-${version}
;;
c9s)
ns=c9s
local image=quay.io/sclorg/postgresql-${version}-$ns
Expand Down
2 changes: 2 additions & 0 deletions test/test-lib-postgresql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ function test_postgresql_imagestream() {
tag="-el8"
if [ "${OS}" == "rhel9" ]; then
tag="-el9"
elif [ "${OS}" == "rhel10" ]; then
tag="-el10"
fi
# Check if the current version is already GA
# This directory is cloned from TMT plan repo 'sclorg-tmt-plans'
Expand Down
11 changes: 5 additions & 6 deletions test/test_postgresql_imagestream.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from container_ci_suite.openshift import OpenShiftAPI
from container_ci_suite.utils import check_variables

from constants import TAGS

if not check_variables():
print("At least one variable from IMAGE_NAME, OS, VERSION is missing.")
sys.exit(1)
Expand All @@ -14,17 +16,14 @@
VERSION = os.getenv("VERSION")
IMAGE_NAME = os.getenv("IMAGE_NAME")
OS = os.getenv("TARGET")
TAGS = {
"rhel8": "-el8",
"rhel9": "-el9"
}
TAG = TAGS.get(OS, None)

TAG = TAGS.get(OS)


class TestPostgreSQLImagestreamTemplate:

def setup_method(self):
self.oc_api = OpenShiftAPI(pod_name_prefix="postgresql", version=VERSION)
self.oc_api = OpenShiftAPI(pod_name_prefix="postgresql", version=VERSION, shared_cluster=True)

def teardown_method(self):
self.oc_api.delete_project()
Expand Down
11 changes: 5 additions & 6 deletions test/test_postgresql_imagestream_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from container_ci_suite.openshift import OpenShiftAPI
from container_ci_suite.utils import check_variables

from constants import TAGS

if not check_variables():
print("At least one variable from IMAGE_NAME, OS, VERSION is missing.")
sys.exit(1)
Expand All @@ -14,17 +16,14 @@
VERSION = os.getenv("VERSION")
IMAGE_NAME = os.getenv("IMAGE_NAME")
OS = os.getenv("TARGET")
TAGS = {
"rhel8": "-el8",
"rhel9": "-el9"
}
TAG = TAGS.get(OS, None)

TAG = TAGS.get(OS)


class TestPostgreSQLImagestreamTemplate:

def setup_method(self):
self.oc_api = OpenShiftAPI(pod_name_prefix="postgresql", version=VERSION)
self.oc_api = OpenShiftAPI(pod_name_prefix="postgresql", version=VERSION, shared_cluster=True)

def teardown_method(self):
self.oc_api.delete_project()
Expand Down
10 changes: 4 additions & 6 deletions test/test_postgresql_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from container_ci_suite.openshift import OpenShiftAPI
from container_ci_suite.utils import check_variables

from constants import TAGS

if not check_variables():
print("At least one variable from IMAGE_NAME, OS, VERSION is missing.")
sys.exit(1)
Expand All @@ -15,17 +17,13 @@
IMAGE_NAME = os.getenv("IMAGE_NAME")
OS = os.getenv("TARGET")

TAGS = {
"rhel8": "-el8",
"rhel9": "-el9"
}
TAG = TAGS.get(OS, None)
TAG = TAGS.get(OS)


class TestPostgreSQLDeployTemplate:

def setup_method(self):
self.oc_api = OpenShiftAPI(pod_name_prefix="postgresql-testing", version=VERSION)
self.oc_api = OpenShiftAPI(pod_name_prefix="postgresql-testing", version=VERSION, shared_cluster=True)

def teardown_method(self):
self.oc_api.delete_project()
Expand Down
1 change: 1 addition & 0 deletions test/test_shared_helm_postgresql_imagestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def teardown_method(self):
("15-el9", "registry.redhat.io/rhel9/postgresql-15:latest", True),
("16-el8", "registry.redhat.io/rhel8/postgresql-16:latest", True),
("16-el9", "registry.redhat.io/rhel9/postgresql-16:latest", True),
("16-el10", "registry.redhat.io/rhel10/postgresql-16:latest", True),
],
)
def test_package_imagestream(self, version, registry, expected):
Expand Down
8 changes: 3 additions & 5 deletions test/test_shared_helm_postgresql_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from container_ci_suite.helm import HelmChartsAPI
from container_ci_suite.utils import check_variables

from constants import TAGS

if not check_variables():
print("At least one variable from IMAGE_NAME, OS, VERSION is missing.")
sys.exit(1)
Expand All @@ -19,11 +21,7 @@
IMAGE_NAME = os.getenv("IMAGE_NAME")
OS = os.getenv("TARGET")

TAGS = {
"rhel8": "-el8",
"rhel9": "-el9"
}
TAG = TAGS.get(OS, None)
TAG = TAGS.get(OS)


class TestHelmPostgresqlPersistent:
Expand Down