Skip to content

Commit

Permalink
Pass env var name
Browse files Browse the repository at this point in the history
  • Loading branch information
nocturnalastro committed Feb 2, 2024
1 parent 3d8e248 commit ecfd012
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/ran-du/internal/randuparams/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Check failure on line 16 in tests/ran-du/internal/randuparams/const.go

View workflow job for this annotation

GitHub Actions / build

exported: comment on exported const KubeEnvKey should be of the form "KubeEnvKey ..." (revive)
KubeEnvKey string = "KUBECONFIG"
)
4 changes: 3 additions & 1 deletion tests/ran-du/tests/ztp-du-policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ 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"
)

var _ = Describe(
"ZTPPoliciesCompliance",
Label("ZTPPoliciesCompliance"),
Ordered,
func() {
var (
clusterName string
err error
)
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")
})

Expand Down

0 comments on commit ecfd012

Please sign in to comment.