Skip to content

Commit

Permalink
Fix test_036
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-zaitsev committed Nov 26, 2023
1 parent c5565e6 commit b46a989
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/e2e/kubectl.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,12 @@ def get_count(kind, name="", label="", chi="", ns=None, shell=None):
if chi != "" and label == "":
label = f"-l clickhouse.altinity.com/chi={chi}"

if ns == None:
ns = current().context.test_namespace

if kind == "pv":
# pv is not namespaced so need to search namespace in claimRef
out = launch(f'get pv {label} -o yaml | grep "namespace: {current().context.test_namespace}"', ok_to_fail=True, shell=shell)
out = launch(f'get pv {label} -o yaml | grep "namespace: {ns}"', ok_to_fail=True, shell=shell)
else:
out = launch(
f"get {kind} {name} -o=custom-columns=kind:kind,name:.metadata.name {label}",
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3466,7 +3466,6 @@ def check_metrics_monitoring(operator_namespace, operator_pod, expect_pattern, m
@TestScenario
@Requirements(RQ_SRS_026_ClickHouseOperator_Managing_ReprovisioningVolume("1.0"))
@Name("test_036. Check operator volume re-provisioning")
@Tags("NO_PARALLEL")
def test_036(self):
"""Check clickhouse operator recreates volumes and schema if volume is broken."""
create_shell_namespace_clickhouse_template()
Expand All @@ -3478,6 +3477,7 @@ def test_036(self):

manifest = f"manifests/chi/test-036-volume-re-provisioning-1.yaml"
chi = yaml_manifest.get_chi_name(util.get_full_path(manifest))
cluster = "simple"
util.require_keeper(keeper_type=self.context.keeper_type)

with Given("chi exists"):
Expand Down

0 comments on commit b46a989

Please sign in to comment.