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

Enable testing mysql 84 rhel9 #390

Open
wants to merge 3 commits into
base: master
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
2 changes: 1 addition & 1 deletion 8.4/Dockerfile.rhel9
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ EXPOSE 3306
# safe in the future. This should *never* change, the last test is there
# to make sure of that.
RUN yum -y module enable mysql:$MYSQL_VERSION && \
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base mysql-server" && \
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind9.18-utils groff-base mysql-server" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
dnf -y clean all --enablerepo='*' && \
Expand Down
1 change: 0 additions & 1 deletion test/run
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ run_general_tests
run_change_password_test
run_change_password_new_user_test
run_replication_test
run_doc_test
run_s2i_test
run_ssl_test
run_datadir_actions_test
Expand Down
6 changes: 5 additions & 1 deletion test/test_mysql_imagestream.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ def teardown_method(self):
]
)
def test_imagestream_template(self, template):
if VERSION == "8.4":
# It is not shipped yet
pytest.skip("Skipping test for 8.4")
if self.oc_api.shared_cluster:
pytest.skip("Skipping test for shared cluster")
os_name = ''.join(i for i in OS if not i.isdigit())
print(os.getcwd())
assert self.oc_api.deploy_image_stream_template(
imagestream_file=f"imagestreams/mysql-{os_name}.json",
template_file=f"examples/{template}",
Expand Down
5 changes: 5 additions & 0 deletions test/test_mysql_imagestream_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def teardown_method(self):
]
)
def test_imagestream_template(self, template):
if VERSION == "8.4":
# It is not shipped yet
pytest.skip("Skipping test for 8.4")
if self.oc_api.shared_cluster:
pytest.skip("Skipping test for shared cluster")
os_name = ''.join(i for i in OS if not i.isdigit())
assert self.oc_api.deploy_image_stream_template(
imagestream_file=f"imagestreams/mysql-{os_name}.json",
Expand Down
2 changes: 2 additions & 0 deletions test/test_mysql_local_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def teardown_method(self):
]
)
def test_template_inside_cluster(self, template):
if self.oc_api.shared_cluster:
pytest.skip("Skipping test for shared cluster")
short_version = VERSION.replace(".", "")
assert self.oc_api.deploy_template_with_image(
image_name=IMAGE_NAME,
Expand Down
2 changes: 1 addition & 1 deletion test/test_mysql_shared_helm_imagestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestHelmRHELMySQLImageStreams:
def setup_method(self):
package_name = "redhat-mysql-imagestreams"
path = test_dir
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=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"
Expand Down
13 changes: 10 additions & 3 deletions test/test_mysql_shared_helm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestHelmMySQLDBPersistent:
def setup_method(self):
package_name = "redhat-mysql-persistent"
path = test_dir
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=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"
Expand All @@ -22,12 +22,19 @@ def setup_method(self):
def teardown_method(self):
self.hc_api.delete_project()

def test_package_persistent(self):
@pytest.mark.parametrize(
"version",
[
"8.0-el8",
"8.0-el9",
],
)
def test_package_persistent(self, version):
self.hc_api.package_name = "redhat-mysql-imagestreams"
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation()
self.hc_api.package_name = "redhat-mysql-persistent"
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation(values={"mysql_version": "8.0-el8", "namespace": self.hc_api.namespace})
assert self.hc_api.helm_installation(values={"mysql_version": version, "namespace": self.hc_api.namespace})
assert self.hc_api.is_pod_running(pod_name_prefix="mysql")
assert self.hc_api.test_helm_chart(expected_str=["42", "testval"])