From 8cd3ad4980667da47a86a60f48707031e4561720 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 4 Sep 2024 14:47:36 +0200 Subject: [PATCH] Remove C8S imagestreams and check that they are not present Signed-off-by: Petr "Stone" Hracek --- .../centos/httpd-imagestreams/src/Chart.yaml | 4 +- .../src/templates/imagestreams.yaml | 37 ++------- .../mariadb-imagestreams/src/Chart.yaml | 4 +- .../src/templates/imagestreams.yaml | 48 ----------- .../centos/mysql-imagestreams/src/Chart.yaml | 4 +- .../src/templates/imagestreams.yaml | 10 +-- .../postgresql-imagestreams/src/Chart.yaml | 4 +- .../src/templates/imagestreams.yaml | 80 ------------------- .../centos/redis-imagestreams/src/Chart.yaml | 4 +- .../src/templates/imagestreams.yaml | 16 ---- tests/test_httpd_imagestreams.py | 28 +++---- tests/test_mariadb_imagestreams.py | 32 ++++---- tests/test_mysql_imagestreams.py | 19 ++--- tests/test_postgresql_imagestreams.py | 39 ++++----- tests/test_redis_imagestreams.py | 22 ++--- 15 files changed, 93 insertions(+), 258 deletions(-) diff --git a/charts/centos/httpd-imagestreams/src/Chart.yaml b/charts/centos/httpd-imagestreams/src/Chart.yaml index e8ef6a8..f26d8aa 100644 --- a/charts/centos/httpd-imagestreams/src/Chart.yaml +++ b/charts/centos/httpd-imagestreams/src/Chart.yaml @@ -4,10 +4,10 @@ description: |- annotations: charts.openshift.io/name: CentOS Apache HTTP Server imagestreams (experimental) apiVersion: v2 -appVersion: 0.0.2 +appVersion: 0.0.3 kubeVersion: '>=1.20.0' name: httpd-imagestreams tags: builder,httpd sources: - https://github.com/sclorg/helm-charts -version: 0.0.2 +version: 0.0.3 diff --git a/charts/centos/httpd-imagestreams/src/templates/imagestreams.yaml b/charts/centos/httpd-imagestreams/src/templates/imagestreams.yaml index 1fbd5ef..cb886e4 100644 --- a/charts/centos/httpd-imagestreams/src/templates/imagestreams.yaml +++ b/charts/centos/httpd-imagestreams/src/templates/imagestreams.yaml @@ -8,24 +8,20 @@ spec: tags: - annotations: description: >- - Build and serve static content via Apache HTTP Server (httpd) on - CentOS 7. For more information about using this builder image, - including OpenShift considerations, see + Build and serve static content via Apache HTTP Server (httpd) 2.4 on + RHEL 8. For more information about using this builder image, + including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md. - - - WARNING: By selecting this tag, your application will automatically - update to use the latest version of Httpd available on OpenShift, - including major version updates. iconClass: icon-apache - openshift.io/display-name: Apache HTTP Server (Latest) + openshift.io/display-name: Apache HTTP Server 2.4 (UBI 8) openshift.io/provider-display-name: Red Hat, Inc. sampleRepo: https://github.com/sclorg/httpd-ex.git supports: httpd tags: builder,httpd + version: "2.4" from: - kind: ImageStreamTag - name: 2.4-ubi8 + kind: DockerImage + name: registry.access.redhat.com/ubi8/httpd-24:latest referencePolicy: type: Local name: latest @@ -67,25 +63,6 @@ spec: referencePolicy: type: Local name: 2.4-ubi8 - - annotations: - description: >- - Build and serve static content via Apache HTTP Server (httpd) 2.4 on - CentOS 8. For more information about using this builder image, - including OpenShift considerations, see - https://github.com/sclorg/httpd-container/blob/master/2.4/README.md. - iconClass: icon-apache - openshift.io/display-name: Apache HTTP Server 2.4 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - sampleRepo: https://github.com/sclorg/httpd-ex.git - supports: httpd - tags: builder,httpd,hidden - version: "2.4" - from: - kind: DockerImage - name: quay.io/sclorg/httpd-24-c8s:latest - referencePolicy: - type: Local - name: 2.4-el8 - annotations: description: >- Build and serve static content via Apache HTTP Server (httpd) 2.4 on diff --git a/charts/centos/mariadb-imagestreams/src/Chart.yaml b/charts/centos/mariadb-imagestreams/src/Chart.yaml index f45891e..083e516 100644 --- a/charts/centos/mariadb-imagestreams/src/Chart.yaml +++ b/charts/centos/mariadb-imagestreams/src/Chart.yaml @@ -5,10 +5,10 @@ description: |- annotations: charts.openshift.io/name: CentOS MariaDB database service imagestreams (experimental) apiVersion: v2 -appVersion: 0.0.2 +appVersion: 0.0.3 kubeVersion: '>=1.20.0' name: mariadb-imagestreams tags: database,mariadb sources: - https://github.com/sclorg/helm-charts -version: 0.0.2 +version: 0.0.3 diff --git a/charts/centos/mariadb-imagestreams/src/templates/imagestreams.yaml b/charts/centos/mariadb-imagestreams/src/templates/imagestreams.yaml index 51c2695..a71c6b5 100644 --- a/charts/centos/mariadb-imagestreams/src/templates/imagestreams.yaml +++ b/charts/centos/mariadb-imagestreams/src/templates/imagestreams.yaml @@ -22,22 +22,6 @@ spec: name: quay.io/sclorg/mariadb-1011-c9s:latest referencePolicy: type: Local - - name: 10.11-el8 - annotations: - openshift.io/display-name: MariaDB 10.11 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a MariaDB 10.11 database on CentOS Stream 8. For more information about - using this database image, including OpenShift considerations, see - https://github.com/sclorg/mariadb-container/tree/master/10.11/README.md. - iconClass: icon-mariadb - tags: database,mariadb - version: "10.11" - from: - kind: DockerImage - name: quay.io/sclorg/mariadb-1011-c8s:latest - referencePolicy: - type: Local - name: 10.5-el9 annotations: openshift.io/display-name: MariaDB 10.5 (CentOS Stream 9) @@ -54,35 +38,3 @@ spec: name: quay.io/sclorg/mariadb-105-c9s:latest referencePolicy: type: Local - - name: 10.5-el8 - annotations: - openshift.io/display-name: MariaDB 10.5 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a MariaDB 10.5 database on CentOS Stream 8. For more information about - using this database image, including OpenShift considerations, see - https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md. - iconClass: icon-mariadb - tags: database,mariadb - version: "10.5" - from: - kind: DockerImage - name: quay.io/sclorg/mariadb-105-c8s:latest - referencePolicy: - type: Local - - name: 10.3-el8 - annotations: - openshift.io/display-name: MariaDB 10.3 (CentOS 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a MariaDB 10.3 database on CentOS 8. For more information about - using this database image, including OpenShift considerations, see - https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md. - iconClass: icon-mariadb - tags: database,mariadb - version: "10.3" - from: - kind: DockerImage - name: quay.io/sclorg/mariadb-103-c8s:latest - referencePolicy: - type: Local diff --git a/charts/centos/mysql-imagestreams/src/Chart.yaml b/charts/centos/mysql-imagestreams/src/Chart.yaml index 5e0f9e0..05c3920 100644 --- a/charts/centos/mysql-imagestreams/src/Chart.yaml +++ b/charts/centos/mysql-imagestreams/src/Chart.yaml @@ -5,10 +5,10 @@ description: |- annotations: charts.openshift.io/name: CentOS MySQL database service imagestreams (experimental) apiVersion: v2 -appVersion: 0.0.2 +appVersion: 0.0.3 kubeVersion: '>=1.20.0' name: mysql-imagestreams tags: database,mysql sources: - https://github.com/sclorg/helm-charts -version: 0.0.2 +version: 0.0.3 diff --git a/charts/centos/mysql-imagestreams/src/templates/imagestreams.yaml b/charts/centos/mysql-imagestreams/src/templates/imagestreams.yaml index cbed1e6..8db6ece 100644 --- a/charts/centos/mysql-imagestreams/src/templates/imagestreams.yaml +++ b/charts/centos/mysql-imagestreams/src/templates/imagestreams.yaml @@ -20,15 +20,15 @@ spec: tags: mysql from: kind: ImageStreamTag - name: 8.0-el8 + name: 8.0-c9s referencePolicy: type: Local - - name: 8.0-el8 + - name: 8.0-c9s annotations: - openshift.io/display-name: MySQL 8.0 (CentOS Stream 8) + openshift.io/display-name: MySQL 8.0 (CentOS Stream 9) openshift.io/provider-display-name: Red Hat, Inc. description: >- - Provides a MySQL 8.0 database on CentOS Stream 8. For more information about + Provides a MySQL 8.0 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md. iconClass: icon-mysql-database @@ -36,6 +36,6 @@ spec: version: "8.0" from: kind: DockerImage - name: quay.io/sclorg/mysql-80-c8s:latest + name: quay.io/sclorg/mysql-80-c9s:latest referencePolicy: type: Local diff --git a/charts/centos/postgresql-imagestreams/src/Chart.yaml b/charts/centos/postgresql-imagestreams/src/Chart.yaml index 419272d..e2c99e1 100644 --- a/charts/centos/postgresql-imagestreams/src/Chart.yaml +++ b/charts/centos/postgresql-imagestreams/src/Chart.yaml @@ -4,10 +4,10 @@ description: |- annotations: charts.openshift.io/name: CentOS PostgreSQL database service imagestreams apiVersion: v2 -appVersion: 0.0.2 +appVersion: 0.0.3 kubeVersion: '>=1.20.0' name: postgresql-imagestreams tags: database,postgresql sources: - https://github.com/sclorg/helm-charts -version: 0.0.2 +version: 0.0.3 diff --git a/charts/centos/postgresql-imagestreams/src/templates/imagestreams.yaml b/charts/centos/postgresql-imagestreams/src/templates/imagestreams.yaml index 7207301..5a90cbb 100644 --- a/charts/centos/postgresql-imagestreams/src/templates/imagestreams.yaml +++ b/charts/centos/postgresql-imagestreams/src/templates/imagestreams.yaml @@ -41,22 +41,6 @@ spec: name: quay.io/sclorg/postgresql-16-c9s:latest referencePolicy: type: Local - - name: 16-el8 - annotations: - openshift.io/display-name: PostgreSQL 16 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a PostgreSQL 16 database on CentOS Stream 8. 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: quay.io/sclorg/postgresql-16-c8s:latest - referencePolicy: - type: Local - name: 15-el9 annotations: openshift.io/display-name: PostgreSQL 15 (CentOS Stream 9) @@ -73,22 +57,6 @@ spec: name: quay.io/sclorg/postgresql-15-c9s:latest referencePolicy: type: Local - - name: 15-el8 - annotations: - openshift.io/display-name: PostgreSQL 15 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a PostgreSQL 15 database on CentOS Stream 8. 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: "15" - from: - kind: DockerImage - name: quay.io/sclorg/postgresql-15-c8s:latest - referencePolicy: - type: Local - name: 13-el9 annotations: openshift.io/display-name: PostgreSQL 13 (CentOS Stream 9) @@ -105,51 +73,3 @@ spec: name: quay.io/sclorg/postgresql-13-c9s:latest referencePolicy: type: Local - - name: 13-el8 - annotations: - openshift.io/display-name: PostgreSQL 13 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a PostgreSQL 13 database on CentOS Stream 8. 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: "13" - from: - kind: DockerImage - name: quay.io/sclorg/postgresql-13-c8s:latest - referencePolicy: - type: Local - - name: 12-el8 - annotations: - openshift.io/display-name: PostgreSQL 12 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a PostgreSQL 12 database on CentOS Stream 8. 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: "12" - from: - kind: DockerImage - name: quay.io/sclorg/postgresql-12-c8s:latest - referencePolicy: - type: Local - - name: 10-el8 - annotations: - openshift.io/display-name: PostgreSQL 10 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - description: >- - Provides a PostgreSQL 10 database on CentOS Stream 8. 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: "10" - from: - kind: DockerImage - name: quay.io/sclorg/postgresql-10-c8s:latest - referencePolicy: - type: Local diff --git a/charts/centos/redis-imagestreams/src/Chart.yaml b/charts/centos/redis-imagestreams/src/Chart.yaml index 721bc6f..28cb2ad 100644 --- a/charts/centos/redis-imagestreams/src/Chart.yaml +++ b/charts/centos/redis-imagestreams/src/Chart.yaml @@ -4,10 +4,10 @@ description: |- annotations: charts.openshift.io/name: Provides a Redis database on CentOS imagestreams (experimental) apiVersion: v2 -appVersion: 0.0.1 +appVersion: 0.0.2 kubeVersion: '>=1.20.0' name: redis-imagestreams tags: builder,redis sources: - https://github.com/sclorg/helm-charts -version: 0.0.1 +version: 0.0.2 diff --git a/charts/centos/redis-imagestreams/src/templates/imagestreams.yaml b/charts/centos/redis-imagestreams/src/templates/imagestreams.yaml index 87dac0d..3629864 100644 --- a/charts/centos/redis-imagestreams/src/templates/imagestreams.yaml +++ b/charts/centos/redis-imagestreams/src/templates/imagestreams.yaml @@ -25,22 +25,6 @@ spec: referencePolicy: type: Local name: latest - - annotations: - description: >- - Provides a Redis 6 database on CentOS Stream 8. For more information about - using this database image, including OpenShift considerations, see - https://github.com/sclorg/redis-container/tree/master/6/README.md. - iconClass: icon-redis - openshift.io/display-name: Redis 6 (CentOS Stream 8) - openshift.io/provider-display-name: Red Hat, Inc. - tags: redis - version: "6" - from: - kind: DockerImage - name: quay.io/sclorg/redis-6-c8s:latest - referencePolicy: - type: Local - name: 6-el8 - annotations: description: >- Provides a Redis 6 database on CentOS Stream 9. For more information about diff --git a/tests/test_httpd_imagestreams.py b/tests/test_httpd_imagestreams.py index c547324..62a5c51 100644 --- a/tests/test_httpd_imagestreams.py +++ b/tests/test_httpd_imagestreams.py @@ -19,19 +19,19 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("2.4-ubi9", "registry.redhat.io/ubi9/httpd-24:latest"), - ("2.4-ubi8", "registry.redhat.io/ubi8/httpd-24:latest"), - ("2.4-el8", "registry.redhat.io/rhel8/httpd-24"), - ("2.4-el9", "registry.redhat.io/rhel9/httpd-24"), + ("2.4-ubi9", "registry.redhat.io/ubi9/httpd-24:latest", True), + ("2.4-ubi8", "registry.redhat.io/ubi8/httpd-24:latest", True), + ("2.4-el8", "registry.redhat.io/rhel8/httpd-24", True), + ("2.4-el9", "registry.redhat.io/rhel9/httpd-24", True), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): self.hc_api.set_version("0.0.1") assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected class TestHelmCentOSHttpdImagestreams: @@ -44,15 +44,15 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("2.4-ubi9", "registry.access.redhat.com/ubi9/httpd-24:latest"), - ("2.4-ubi8", "registry.access.redhat.com/ubi8/httpd-24:latest"), - ("2.4-el8", "quay.io/sclorg/httpd-24-c8s:latest"), - ("2.4-el9", "quay.io/sclorg/httpd-24-c9s:latest"), + ("2.4-ubi9", "registry.access.redhat.com/ubi9/httpd-24:latest", True), + ("2.4-ubi8", "registry.access.redhat.com/ubi8/httpd-24:latest", True), + ("2.4-el8", "quay.io/sclorg/httpd-24-c8s:latest", False), + ("2.4-el9", "quay.io/sclorg/httpd-24-c9s:latest", True), ] ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_mariadb_imagestreams.py b/tests/test_mariadb_imagestreams.py index 0060588..47afe54 100644 --- a/tests/test_mariadb_imagestreams.py +++ b/tests/test_mariadb_imagestreams.py @@ -19,19 +19,19 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("10.11-el9", "registry.redhat.io/rhel9/mariadb-1011:latest"), - ("10.11-el8", "registry.redhat.io/rhel8/mariadb-1011:latest"), - ("10.5-el9", "registry.redhat.io/rhel9/mariadb-105:latest"), - ("10.3-el8", "registry.redhat.io/rhel8/mariadb-103:latest"), - ("10.5-el8", "registry.redhat.io/rhel8/mariadb-105:latest"), + ("10.11-el9", "registry.redhat.io/rhel9/mariadb-1011:latest", True), + ("10.11-el8", "registry.redhat.io/rhel8/mariadb-1011:latest", True), + ("10.5-el9", "registry.redhat.io/rhel9/mariadb-105:latest", True), + ("10.3-el8", "registry.redhat.io/rhel8/mariadb-103:latest", True), + ("10.5-el8", "registry.redhat.io/rhel8/mariadb-105:latest", True), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected class TestHelmCentOSMariadbImageStreams: @@ -45,16 +45,16 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("10.3-el8", "quay.io/sclorg/mariadb-103-c8s:latest"), - ("10.5-el8", "quay.io/sclorg/mariadb-105-c8s:latest"), - ("10.5-el9", "quay.io/sclorg/mariadb-105-c9s:latest"), - ("10.11-el8", "quay.io/sclorg/mariadb-1011-c8s:latest"), - ("10.11-el9", "quay.io/sclorg/mariadb-1011-c9s:latest"), + ("10.3-el8", "quay.io/sclorg/mariadb-103-c8s:latest", False), + ("10.5-el8", "quay.io/sclorg/mariadb-105-c8s:latest", False), + ("10.5-el9", "quay.io/sclorg/mariadb-105-c9s:latest", True), + ("10.11-el8", "quay.io/sclorg/mariadb-1011-c8s:latest", False), + ("10.11-el9", "quay.io/sclorg/mariadb-1011-c9s:latest", True), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_mysql_imagestreams.py b/tests/test_mysql_imagestreams.py index 3f322a2..63cfef5 100644 --- a/tests/test_mysql_imagestreams.py +++ b/tests/test_mysql_imagestreams.py @@ -19,16 +19,16 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("8.0-el9", "registry.redhat.io/rhel9/mysql-80:latest"), - ("8.0-el8", "registry.redhat.io/rhel8/mysql-80:latest"), + ("8.0-el9", "registry.redhat.io/rhel9/mysql-80:latest", True), + ("8.0-el8", "registry.redhat.io/rhel8/mysql-80:latest", True), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected class TestHelmCentOSMySQLImageStreams: @@ -42,12 +42,13 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("8.0-el8", "quay.io/sclorg/mysql-80-c8s:latest"), + ("8.0-c8s", "quay.io/sclorg/mysql-80-c8s:latest", False), + ("8.0-c9s", "quay.io/sclorg/mysql-80-c9s:latest", True), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_postgresql_imagestreams.py b/tests/test_postgresql_imagestreams.py index ffd64c2..a3b06fb 100644 --- a/tests/test_postgresql_imagestreams.py +++ b/tests/test_postgresql_imagestreams.py @@ -19,20 +19,21 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("13-el8", "registry.redhat.io/rhel8/postgresql-13:latest"), - ("13-el9", "registry.redhat.io/rhel9/postgresql-13:latest"), - ("15-el8", "registry.redhat.io/rhel8/postgresql-15:latest"), - ("15-el9", "registry.redhat.io/rhel9/postgresql-15:latest"), - ("16-el8", "registry.redhat.io/rhel8/postgresql-16:latest"), - ("16-el9", "registry.redhat.io/rhel9/postgresql-16:latest"), + ("10-el8", "registry.redhat.io/rhel8/postgresql-10:latest", False), + ("13-el8", "registry.redhat.io/rhel8/postgresql-13:latest", True), + ("13-el9", "registry.redhat.io/rhel9/postgresql-13:latest", True), + ("15-el8", "registry.redhat.io/rhel8/postgresql-15:latest", True), + ("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), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected class TestHelmCentOSLPostgresqlImageStreams: @@ -46,18 +47,18 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("16-el9", "quay.io/sclorg/postgresql-16-c9s:latest"), - ("16-el8", "quay.io/sclorg/postgresql-16-c8s:latest"), - ("15-el9", "quay.io/sclorg/postgresql-15-c9s:latest"), - ("15-el8", "quay.io/sclorg/postgresql-15-c8s:latest"), - ("13-el9", "quay.io/sclorg/postgresql-13-c9s:latest"), - ("13-el8", "quay.io/sclorg/postgresql-13-c8s:latest"), - ("12-el8", "quay.io/sclorg/postgresql-12-c8s:latest"), + ("16-el9", "quay.io/sclorg/postgresql-16-c9s:latest", True), + ("16-el8", "quay.io/sclorg/postgresql-16-c8s:latest", False), + ("15-el9", "quay.io/sclorg/postgresql-15-c9s:latest", True), + ("15-el8", "quay.io/sclorg/postgresql-15-c8s:latest", False), + ("13-el9", "quay.io/sclorg/postgresql-13-c9s:latest", True), + ("13-el8", "quay.io/sclorg/postgresql-13-c8s:latest", False), + ("12-el8", "quay.io/sclorg/postgresql-12-c8s:latest", False), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_redis_imagestreams.py b/tests/test_redis_imagestreams.py index bc76f67..c957f32 100644 --- a/tests/test_redis_imagestreams.py +++ b/tests/test_redis_imagestreams.py @@ -19,16 +19,16 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("6-el9", "registry.redhat.io/rhel9/redis-6:latest"), - ("6-el8", "registry.redhat.io/rhel8/redis-6:latest"), + ("6-el9", "registry.redhat.io/rhel9/redis-6:latest", True), + ("6-el8", "registry.redhat.io/rhel8/redis-6:latest", True), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected class TestHelmCentOSRedisImageStreams: @@ -42,14 +42,14 @@ def teardown_method(self): self.hc_api.delete_project() @pytest.mark.parametrize( - "version,registry", + "version,registry,expected", [ - ("6-el8", "quay.io/sclorg/redis-6-c8s:latest"), - ("6-el9", "quay.io/sclorg/redis-6-c9s:latest"), - ("7-el9", "quay.io/sclorg/redis-7-c9s:latest"), + ("6-el8", "quay.io/sclorg/redis-6-c8s:latest", False), + ("6-el9", "quay.io/sclorg/redis-6-c9s:latest", True), + ("7-el9", "quay.io/sclorg/redis-7-c9s:latest", True), ], ) - def test_package_imagestream(self, version, registry): + def test_package_imagestream(self, version, registry, expected): assert self.hc_api.helm_package() assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected