From e8f27228a296188476194a11f499819a6a03562a Mon Sep 17 00:00:00 2001 From: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Date: Wed, 8 Feb 2023 17:08:20 -0800 Subject: [PATCH] Use latest Version of Operator for Testing (#2650) --- portal-ui/tests/permissions-2/inspect.ts | 9 ++------- tests/common.sh | 11 +++++++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/portal-ui/tests/permissions-2/inspect.ts b/portal-ui/tests/permissions-2/inspect.ts index a975be618..9883593f7 100644 --- a/portal-ui/tests/permissions-2/inspect.ts +++ b/portal-ui/tests/permissions-2/inspect.ts @@ -48,14 +48,9 @@ const inspectScreenUrl = `${testDomainUrl}${IAM_PAGES.SUPPORT_INSPECT}`; const loginSubmitBtn = Selector("form button"); -export const supportSidebarEl = Selector(".MuiPaper-root") +export const inspectEl = Selector(".MuiPaper-root") .find("ul") - .child("#support"); - -export const supportChildren = Selector("#support-children"); -export const inspectEl = supportChildren - .find("a") - .withAttribute("href", IAM_PAGES.SUPPORT_INSPECT); + .child("#inspect"); export const inspect_volume_input = Selector('[data-test-id="inspect_volume"]'); export const inspect_path_input = Selector('[data-test-id="inspect_path"]'); diff --git a/tests/common.sh b/tests/common.sh index 5fa7f4ac3..2798d4f36 100755 --- a/tests/common.sh +++ b/tests/common.sh @@ -37,10 +37,17 @@ function setup_kind() { try kubectl get nodes } +function get_latest_release() { + curl --silent "https://api.github.com/repos/$1/releases/latest" | + grep '"tag_name":' | + sed -E 's/.*"([^"]+)".*/\1/' +} + function install_operator() { - echo " Load minio/operator image to the cluster" - try kubectl apply -k github.com/minio/operator/ + OPR_LATEST=$(get_latest_release minio/operator) + echo " Load minio/operator image ($OPR_LATEST) to the cluster" + try kubectl apply -k github.com/minio/operator/\?ref\=$OPR_LATEST echo "Waiting for k8s api" sleep 10 echo "Waiting for Operator Pods to come online (2m timeout)"