From c9d174df0918ef3e3e7128bfea097d8042ad384b Mon Sep 17 00:00:00 2001 From: Cesar Celis Hernandez Date: Tue, 31 May 2022 00:15:03 -0400 Subject: [PATCH] Wait for PVC to be bounded (#2054) --- portal-ui/tests/operator/tenants.ts | 4 +--- portal-ui/tests/scripts/operator.sh | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/portal-ui/tests/operator/tenants.ts b/portal-ui/tests/operator/tenants.ts index 30f616278..8a25720d0 100644 --- a/portal-ui/tests/operator/tenants.ts +++ b/portal-ui/tests/operator/tenants.ts @@ -78,10 +78,8 @@ const checkPodDescribeHasSections = async () => { }; test("Test describe section for PVCs in new tenant", async (t) => { - const tenantName = `tenant-${Math.floor(Math.random() * 10000)}`; + const tenantName = `storage-lite`; await loginToOperator(); - await createTenant(tenantName); - await t.wait(20000); // wait for PVCs to be created await testPvcDescribe(tenantName); await redirectToTenantsList(); await deleteTenant(tenantName); diff --git a/portal-ui/tests/scripts/operator.sh b/portal-ui/tests/scripts/operator.sh index 586bc5a31..30da50516 100755 --- a/portal-ui/tests/scripts/operator.sh +++ b/portal-ui/tests/scripts/operator.sh @@ -165,6 +165,9 @@ function install_tenant() { --selector $key=$value \ --timeout=300s + echo "Wait for Prometheus PVC to be bound" + while [[ $(kubectl get pvc storage-lite-prometheus-storage-lite-prometheus-0 -n tenant-lite -o 'jsonpath={..status.phase}') != "Bound" ]]; do echo "waiting for PVC status" && sleep 1 && kubectl get pvc -A; done + echo "Build passes basic tenant creation" }