Skip to content

Commit a581555

Browse files
committed
Fix broken Keeper tests that apparently does not have actionPlan in
status
1 parent 857ee30 commit a581555

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/e2e/kubectl.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def create_and_check(manifest, check, kind="chi", ns=None, shell=None, timeout=1
172172
# wait_field_changed("chi", chi_name, state_field, prev_state, ns)
173173
wait_field(kind=kind, name=chi_name, field=".status.status", value="InProgress"
174174
, ns=ns, retries=3, throw_error=False, shell=shell)
175-
actionPlan = get_chi_actionPlan(chi_name, ns, shell)
175+
actionPlan = get_actionPlan(kind, chi_name, ns, shell)
176176
print(actionPlan)
177177

178178
wait_field(kind=kind, name=chi_name, field=".status.status", value="Completed"
@@ -237,9 +237,12 @@ def get_chi_normalizedCompleted(chi, ns=None, shell=None):
237237
chi_storage = get("configmap", f"chi-storage-{chi}", ns=ns)
238238
return json.loads(chi_storage["data"]["status-normalizedCompleted"])
239239

240-
def get_chi_actionPlan(chi, ns=None, shell=None):
241-
chi_storage = get("configmap", f"chi-storage-{chi}", ns=ns)
242-
return chi_storage["data"]["status-actionPlan"]
240+
def get_actionPlan(kind, name, ns=None, shell=None):
241+
if kind == 'chi':
242+
storage = get("configmap", f"chi-storage-{name}", ns=ns)
243+
return storage["data"]["status-actionPlan"]
244+
else:
245+
return ""
243246

244247

245248
def create_ns(ns):

0 commit comments

Comments
 (0)