-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathtest_mariadb_shared_helm_imagestreams.py
38 lines (30 loc) · 1.38 KB
/
test_mariadb_shared_helm_imagestreams.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
import pytest
from pathlib import Path
from container_ci_suite.helm import HelmChartsAPI
test_dir = Path(os.path.abspath(os.path.dirname(__file__)))
class TestHelmRHELMariadbImageStreams:
def setup_method(self):
package_name = "redhat-mariadb-imagestreams"
path = test_dir
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir, shared_cluster=True)
self.hc_api.clone_helm_chart_repo(
repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts",
subdir="charts/redhat"
)
def teardown_method(self):
self.hc_api.delete_project()
@pytest.mark.parametrize(
"version,registry,expected",
[
("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, expected):
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation()
assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected