diff --git a/README.md b/README.md index 012e4acb..0a6447ee 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,6 @@ E2E test suite for opendatahub using fabric8 kubernetes client ## Environment variables * **ENV_FILE** - path to yaml file with env variables values -* **KUBE_USERNAME** - user of the cluster -* **KUBE_PASSWORD** - password of kube user * **KUBE_TOKEN** - token of kube access (use instead of username/password) * **KUBE_URL** - url of the cluster (api url) * **PRODUCT** - odh or rhoai diff --git a/docs/md/io/odh/test/e2e/standard/UninstallST.md b/docs/md/io/odh/test/e2e/standard/UninstallST.md index 282a7625..d0207c34 100644 --- a/docs/md/io/odh/test/e2e/standard/UninstallST.md +++ b/docs/md/io/odh/test/e2e/standard/UninstallST.md @@ -27,6 +27,7 @@ | - | - | - | | 1. | Create uninstall configmap | ConfigMap exists | | 2. | Wait for controllers namespace deletion | Controllers namespace is deleted | -| 3. | Remove Operator namespace | Operator namespace is deleted | +| 3. | Check that relevant resources are deleted (Subscription, InstallPlan, CSV) | All relevant resources are deleted | | 4. | Check that all related namespaces are deleted (monitoring, notebooks, controllers) | All related namespaces are deleted | +| 5. | Remove Operator namespace | Operator namespace is deleted | diff --git a/src/main/java/io/odh/test/Environment.java b/src/main/java/io/odh/test/Environment.java index 1a3e0ca7..1719a65f 100644 --- a/src/main/java/io/odh/test/Environment.java +++ b/src/main/java/io/odh/test/Environment.java @@ -38,8 +38,6 @@ public class Environment { public static final String USER_PATH = System.getProperty("user.dir"); private static final String CONFIG_FILE_PATH_ENV = "ENV_FILE"; - private static final String USERNAME_ENV = "KUBE_USERNAME"; - private static final String PASSWORD_ENV = "KUBE_PASSWORD"; private static final String TOKEN_ENV = "KUBE_TOKEN"; private static final String URL_ENV = "KUBE_URL"; private static final String PRODUCT_ENV = "PRODUCT"; @@ -77,8 +75,6 @@ public class Environment { */ public static final String PRODUCT = getOrDefault(PRODUCT_ENV, PRODUCT_ODH); public static final String RUN_USER = getOrDefault("USER", null); - public static final String KUBE_USERNAME = getOrDefault(USERNAME_ENV, null); - public static final String KUBE_PASSWORD = getOrDefault(PASSWORD_ENV, null); public static final String KUBE_TOKEN = getOrDefault(TOKEN_ENV, null); public static final String KUBE_URL = getOrDefault(URL_ENV, null); diff --git a/src/main/java/io/odh/test/platform/KubeClient.java b/src/main/java/io/odh/test/platform/KubeClient.java index 476acfef..0260feaa 100644 --- a/src/main/java/io/odh/test/platform/KubeClient.java +++ b/src/main/java/io/odh/test/platform/KubeClient.java @@ -92,23 +92,7 @@ public KubeClient inNamespace(String namespace) { } private Config getConfig() { - if (Environment.KUBE_USERNAME != null - && Environment.KUBE_PASSWORD != null - && Environment.KUBE_URL != null) { - Exec.exec(Arrays.asList("oc", "login", "-u", Environment.KUBE_USERNAME, - "-p", Environment.KUBE_PASSWORD, - "--insecure-skip-tls-verify", - "--kubeconfig", Environment.USER_PATH + "/test.kubeconfig", - Environment.KUBE_URL)); - kubeconfigPath = Environment.USER_PATH + "/test.kubeconfig"; - return new ConfigBuilder() - .withUsername(Environment.KUBE_USERNAME) - .withPassword(Environment.KUBE_PASSWORD) - .withMasterUrl(Environment.KUBE_URL) - .withDisableHostnameVerification(true) - .withTrustCerts(true) - .build(); - } else if (Environment.KUBE_URL != null + if (Environment.KUBE_URL != null && Environment.KUBE_TOKEN != null) { Exec.exec(Arrays.asList("oc", "login", "--token", Environment.KUBE_TOKEN, "--insecure-skip-tls-verify",