diff --git a/tests/test_httpd_imagestreams.py b/tests/test_httpd_imagestreams.py index f0bd01c..ff4be1f 100644 --- a/tests/test_httpd_imagestreams.py +++ b/tests/test_httpd_imagestreams.py @@ -7,17 +7,17 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="httpd-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() class TestHelmRHELHttpdImageStreams: - def setup_method(self): - package_name = "httpd-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) - - def teardown_method(self): - self.hc_api.delete_project() - @pytest.mark.parametrize( "version,registry,expected", [ @@ -27,7 +27,7 @@ def teardown_method(self): ("2.4-el9", "registry.redhat.io/rhel9/httpd-24", True), ], ) - def test_httpd_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) == expected + def test_httpd_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_mariadb_imagestreams.py b/tests/test_mariadb_imagestreams.py index 9fcdd17..2ef7fd2 100644 --- a/tests/test_mariadb_imagestreams.py +++ b/tests/test_mariadb_imagestreams.py @@ -7,16 +7,17 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="mariadb-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() -class TestHelmRHELMariadbImageStreams: - - def setup_method(self): - package_name = "mariadb-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) - def teardown_method(self): - self.hc_api.delete_project() +class TestHelmRHELMariadbImageStreams: @pytest.mark.parametrize( "version,registry,expected", @@ -28,7 +29,7 @@ def teardown_method(self): ("10.5-el8", "registry.redhat.io/rhel8/mariadb-105:latest", True), ], ) - 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) == expected + def test_package_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_mysql_imagestreams.py b/tests/test_mysql_imagestreams.py index 2e703c4..fc6b80d 100644 --- a/tests/test_mysql_imagestreams.py +++ b/tests/test_mysql_imagestreams.py @@ -7,17 +7,17 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="mysql-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() class TestHelmRHELMySQLImageStreams: - def setup_method(self): - package_name = "mysql-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) - - def teardown_method(self): - self.hc_api.delete_project() - @pytest.mark.parametrize( "version,registry,expected", [ @@ -25,7 +25,7 @@ def teardown_method(self): ("8.0-el8", "registry.redhat.io/rhel8/mysql-80:latest", True), ], ) - 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) == expected + def test_package_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_nginx_imagestreams.py b/tests/test_nginx_imagestreams.py index ccdd64c..a372260 100644 --- a/tests/test_nginx_imagestreams.py +++ b/tests/test_nginx_imagestreams.py @@ -7,17 +7,17 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="nginx-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() class TestHelmRHELNginxImageStreams: - def setup_method(self): - package_name = "nginx-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) - - def teardown_method(self): - self.hc_api.delete_project() - @pytest.mark.parametrize( "version,registry,expected", [ @@ -29,7 +29,7 @@ def teardown_method(self): ("1.20-ubi8", "registry.redhat.io/ubi8/nginx-120:latest", False), ], ) - 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) == expected + def test_package_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_nodejs_imagestreams.py b/tests/test_nodejs_imagestreams.py index 1fd66a7..610e2b1 100644 --- a/tests/test_nodejs_imagestreams.py +++ b/tests/test_nodejs_imagestreams.py @@ -7,16 +7,17 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="redhat-nodejs-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() class TestHelmRHELNodeJSImageStreams: - def setup_method(self): - package_name = "redhat-nodejs-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) - - def teardown_method(self): - self.hc_api.delete_project() @pytest.mark.parametrize( "version,registry", diff --git a/tests/test_perl_imagestreams.py b/tests/test_perl_imagestreams.py index 517faf1..cc5678a 100644 --- a/tests/test_perl_imagestreams.py +++ b/tests/test_perl_imagestreams.py @@ -7,16 +7,18 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="perl-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() -class TestHelmRHELPerlImageStreams: - def setup_method(self): - package_name = "perl-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) +class TestHelmRHELPerlImageStreams: - def teardown_method(self): - self.hc_api.delete_project() @pytest.mark.parametrize( "version,registry", @@ -26,7 +28,7 @@ def teardown_method(self): ("5.26-ubi8", "registry.redhat.io/ubi8/perl-526:latest"), ], ) - def test_package_imagestream(self, version, registry): - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + def test_package_imagestream(self, helm_api, version, registry): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) diff --git a/tests/test_php_cakephp_application.py b/tests/test_php_cakephp_application.py index ab6ecff..20a4220 100644 --- a/tests/test_php_cakephp_application.py +++ b/tests/test_php_cakephp_application.py @@ -24,7 +24,6 @@ def teardown_method(self): "7.4-ubi8", "8.0-ubi8", "8.0-ubi9", - "8.1-ubi9", "8.2-ubi8", "8.2-ubi9", ] diff --git a/tests/test_php_imagestreams.py b/tests/test_php_imagestreams.py index e542506..26375eb 100644 --- a/tests/test_php_imagestreams.py +++ b/tests/test_php_imagestreams.py @@ -7,16 +7,18 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="php-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() -class TestHelmRHELPHPImageStreams: - def setup_method(self): - package_name = "php-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) +class TestHelmRHELPHPImageStreams: - def teardown_method(self): - self.hc_api.delete_project() @pytest.mark.parametrize( "version,registry,expected", @@ -29,7 +31,7 @@ def teardown_method(self): ("7.4-ubi8", "registry.redhat.io/ubi8/php-74:latest", True), ], ) - 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) == expected + def test_package_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_postgresql_imagestreams.py b/tests/test_postgresql_imagestreams.py index 7273ce4..e7701b9 100644 --- a/tests/test_postgresql_imagestreams.py +++ b/tests/test_postgresql_imagestreams.py @@ -7,16 +7,18 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="postgresql-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() -class TestHelmRHELPostgresqlImageStreams: - def setup_method(self): - package_name = "postgresql-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) +class TestHelmRHELPostgresqlImageStreams: - def teardown_method(self): - self.hc_api.delete_project() @pytest.mark.parametrize( "version,registry,expected", @@ -30,7 +32,7 @@ def teardown_method(self): ("16-el9", "registry.redhat.io/rhel9/postgresql-16:latest", True), ], ) - 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) == expected + def test_package_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_python_imagestreams.py b/tests/test_python_imagestreams.py index 35a5cfb..6927476 100644 --- a/tests/test_python_imagestreams.py +++ b/tests/test_python_imagestreams.py @@ -7,16 +7,18 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="python-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() -class TestHelmRHELPythonImageStreams: - def setup_method(self): - package_name = "python-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) +class TestHelmRHELPythonImageStreams: - def teardown_method(self): - self.hc_api.delete_project() @pytest.mark.parametrize( "version,registry", @@ -30,7 +32,7 @@ def teardown_method(self): ("3.6-ubi8", "registry.redhat.io/ubi8/python-36:latest"), ], ) - def test_package_imagestream(self, version, registry): - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + def test_package_imagestream(self, helm_api, version, registry): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) diff --git a/tests/test_redis_imagestreams.py b/tests/test_redis_imagestreams.py index ddf6ebc..1108bca 100644 --- a/tests/test_redis_imagestreams.py +++ b/tests/test_redis_imagestreams.py @@ -7,16 +7,19 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="redis-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() + -class TestHelmRHELRedisImageStreams: - def setup_method(self): - package_name = "redis-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) +class TestHelmRHELRedisImageStreams: - def teardown_method(self): - self.hc_api.delete_project() @pytest.mark.parametrize( "version,registry,expected", @@ -25,7 +28,7 @@ def teardown_method(self): ("6-el8", "registry.redhat.io/rhel8/redis-6:latest", True), ], ) - 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) == expected + def test_package_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/tests/test_ruby_imagestreams.py b/tests/test_ruby_imagestreams.py index 87fdf07..8e15b1b 100644 --- a/tests/test_ruby_imagestreams.py +++ b/tests/test_ruby_imagestreams.py @@ -7,16 +7,18 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/redhat", package_name="ruby-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() -class TestHelmRHELRubyImageStreams: - def setup_method(self): - package_name = "ruby-imagestreams" - path = test_dir / "../charts/redhat" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) +class TestHelmRHELRubyImageStreams: - def teardown_method(self): - self.hc_api.delete_project() @pytest.mark.parametrize( "version,registry", @@ -29,7 +31,7 @@ def teardown_method(self): ("2.5-ubi8", "registry.redhat.io/ubi8/ruby-25:latest"), ], ) - def test_package_imagestream(self, version, registry): - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation() - assert self.hc_api.check_imagestreams(version=version, registry=registry) + def test_package_imagestream(self, helm_api, version, registry): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) diff --git a/tests/test_valkey_imagestreams.py b/tests/test_valkey_imagestreams.py index 672a38e..82cb6d5 100644 --- a/tests/test_valkey_imagestreams.py +++ b/tests/test_valkey_imagestreams.py @@ -7,16 +7,17 @@ test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +@pytest.fixture(scope="module") +def helm_api(request): + helm_api = HelmChartsAPI(path=test_dir / "../charts/centos", package_name="valkey-imagestreams", tarball_dir=test_dir) + print(request) + # app_name = os.path.basename(request.param) + yield helm_api + pass + helm_api.delete_project() -class TestHelmCentOSValkeyImageStreams: - - def setup_method(self): - package_name = "valkey-imagestreams" - path = test_dir / "../charts/centos" - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) - def teardown_method(self): - self.hc_api.delete_project() +class TestHelmCentOSValkeyImageStreams: @pytest.mark.parametrize( "version,registry,expected", @@ -24,7 +25,7 @@ def teardown_method(self): ("7-el10", "quay.io/sclorg/valkey-7-c10s:latest", True), ], ) - 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) == expected + def test_package_imagestream(self, helm_api, version, registry, expected): + assert helm_api.helm_package() + assert helm_api.helm_installation() + assert helm_api.check_imagestreams(version=version, registry=registry) == expected