Small hotfixes:

* fixed Sanity test for clds (to check all, not only ready)
* removed some obsolete commands
* added CLUSTER_NAME var

Related-PROD: K0RQA-15
Change-Id: I20695cc235384713b642073e816b718ecbfeb35f
diff --git a/k8s/sanity-checks/test_sanity_checks.py b/k8s/sanity-checks/test_sanity_checks.py
index 2ad5267..7b9bf05 100644
--- a/k8s/sanity-checks/test_sanity_checks.py
+++ b/k8s/sanity-checks/test_sanity_checks.py
@@ -31,6 +31,15 @@
     return ready_clds
 
 
+def get_all_cluster_deployments(kcm_manager):
+    all_clds = []
+    clds = kcm_manager.list_all_clusterdeployments()
+
+    for cld in clds:
+        all_clds.append((cld.namespace, cld.name))
+    return all_clds
+
+
 def check_cluster_deployment_exists(kcm_manager, namespace, name) -> bool:
     clds = kcm_manager.list_all_clusterdeployments()
     return any(cld.namespace == namespace and cld.name == name for cld in clds)
@@ -209,10 +218,11 @@
 
 @pytest.mark.sanity
 def test_child_clusters_are_ready(kcm_manager, subtests):
-    ready_clds = get_ready_cluster_deployments(kcm_manager)
-    assert ready_clds, "No ready child clusters found"
+    all_clds = get_all_cluster_deployments(kcm_manager)
+    if not all_clds:
+        pytest.skip("No child cluster deployments found.")
 
-    for namespace, cld_name in ready_clds:
+    for namespace, cld_name in all_clds:
         label = f"{cld_name} ({namespace})"
         with subtests.test(cluster=label):
             ns = kcm_manager.get_namespace(namespace)
diff --git a/k8s/workspace/init-workspace.sh b/k8s/workspace/init-workspace.sh
index ad476a8..eab4a1d 100644
--- a/k8s/workspace/init-workspace.sh
+++ b/k8s/workspace/init-workspace.sh
@@ -87,7 +87,6 @@
 
 cp -v /opt/res-files/k8s/yamls/qa-rally.yaml $MY_PROJFOLDER/yamls
 cp -v /opt/res-files/k8s/yamls/qa-res.yaml $MY_PROJFOLDER/yamls
-cp -v /opt/res-files/k8s/yamls/qa-toolset-bare.yaml $MY_PROJFOLDER/yamls
 cp -v /opt/res-files/k8s/yamls/qa-toolset.yaml $MY_PROJFOLDER/yamls
 
 # remove duplicate init
diff --git a/k8s/workspace/mgmtrc b/k8s/workspace/mgmtrc
index 615236c..1bf5486 100644
--- a/k8s/workspace/mgmtrc
+++ b/k8s/workspace/mgmtrc
@@ -1,2 +1,3 @@
 #!/bin/bash
 export KUBECONFIG=$MY_PROJFOLDER/envs/kubeconfigs/mgmt-kubeconfig.yaml
+export CLUSTER_NAME=mgmt
\ No newline at end of file
diff --git a/k8s/workspace/run-k0rdent-sanity-for-child.sh b/k8s/workspace/run-k0rdent-sanity-for-child.sh
index b163521..b1a1640 100644
--- a/k8s/workspace/run-k0rdent-sanity-for-child.sh
+++ b/k8s/workspace/run-k0rdent-sanity-for-child.sh
@@ -1,9 +1,7 @@
 #!/bin/bash
 
-if [ -z "$MY_PROJFOLDER" ]; then
-  echo "The /artifacts/env.sh script is not sourced. Please do 'source env.sh' before running the Sanity tests"
-  exit 1
-fi
+cd /artifacts
+. env.sh
 
 . "$(dirname "$0")/functions.sh"
 cd $MY_PROJFOLDER/tmp
diff --git a/k8s/workspace/run-k0rdent-sanity.sh b/k8s/workspace/run-k0rdent-sanity.sh
index 9ab9b52..19d814c 100644
--- a/k8s/workspace/run-k0rdent-sanity.sh
+++ b/k8s/workspace/run-k0rdent-sanity.sh
@@ -1,9 +1,7 @@
 #!/bin/bash
 
-if [ -z "$MY_PROJFOLDER" ]; then
-  echo "The /artifacts/env.sh script is not sourced. Please do 'source env.sh' before running the Sanity tests"
-  exit 1
-fi
+cd /artifacts
+. env.sh
 
 . "$(dirname "$0")/functions.sh"
 cd $MY_PROJFOLDER/tmp
diff --git a/k8s/workspace/target-child b/k8s/workspace/target-child
index b45b039..92961e0 100644
--- a/k8s/workspace/target-child
+++ b/k8s/workspace/target-child
@@ -2,3 +2,4 @@
 export TARGET_NAMESPACE=${CHILD_CLUSTER_NS}
 export TARGET_CLUSTER=${CHILD_CLUSTER_NAME}
 export TARGET_CLD=${CHILD_CLUSTER_NAME}
+export CLUSTER_NAME=$TARGET_CLUSTER
\ No newline at end of file