diff --git a/tests/ran-du/internal/randuparams/const.go b/tests/ran-du/internal/randuparams/const.go index 019259af..ce7cf681 100644 --- a/tests/ran-du/internal/randuparams/const.go +++ b/tests/ran-du/internal/randuparams/const.go @@ -13,4 +13,6 @@ const ( DefaultTimeout = 300 * time.Second // TestWorkloadShellLaunchMethod is used when usin a shell script for launching the test workload. TestWorkloadShellLaunchMethod = "shell" + // DU Hosts kubeconfig env var. + KubeEnvKey string = "KUBECONFIG" ) diff --git a/tests/ran-du/tests/ztp-du-policies.go b/tests/ran-du/tests/ztp-du-policies.go index 0c7ce9bb..b6cb780c 100644 --- a/tests/ran-du/tests/ztp-du-policies.go +++ b/tests/ran-du/tests/ztp-du-policies.go @@ -10,6 +10,7 @@ import ( "github.com/openshift-kni/eco-goinfra/pkg/polarion" "github.com/openshift-kni/eco-gosystem/tests/internal/cluster" . "github.com/openshift-kni/eco-gosystem/tests/ran-du/internal/randuinittools" + "github.com/openshift-kni/eco-gosystem/tests/ran-du/internal/randuparams" policiesv1 "open-cluster-management.io/governance-policy-propagator/api/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -17,6 +18,7 @@ import ( var _ = Describe( "ZTPPoliciesCompliance", Label("ZTPPoliciesCompliance"), + Ordered, func() { var ( clusterName string @@ -24,7 +26,7 @@ var _ = Describe( ) BeforeAll(func() { By("Fetching Cluster name") - clusterName, err = cluster.GetClusterName(APIClient.KubeconfigPath) + clusterName, err = cluster.GetClusterName(randuparams.KubeEnvKey) Expect(err).ToNot(HaveOccurred(), "Failed to get cluster name") })