Skip to content

Commit

Permalink
Merge pull request #220 from elmiko/revert-capi-group
Browse files Browse the repository at this point in the history
Bug 2045561: revert defaultCAPIGroup constant
  • Loading branch information
openshift-merge-robot committed Jan 26, 2022
2 parents 1998580 + 3f7eafa commit 25d3ad5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -44,7 +44,7 @@ import (
const (
machineProviderIDIndex = "machineProviderIDIndex"
nodeProviderIDIndex = "nodeProviderIDIndex"
defaultCAPIGroup = "machine.openshift.io"
defaultCAPIGroup = "cluster.x-k8s.io"
// CAPIGroupEnvVar contains the environment variable name which allows overriding defaultCAPIGroup.
CAPIGroupEnvVar = "CAPI_GROUP"
resourceNameMachine = "machines"
Expand Down
Expand Up @@ -911,6 +911,11 @@ func Test_clusterNameFromResource(t *testing.T) {
}

func Test_getKeyHelpers(t *testing.T) {
// unset the environment variable to ensure we get the default from the code
if err := os.Setenv(CAPIGroupEnvVar, ""); err != nil {
t.Fatalf("unexpected error: %v", err)
}

for _, tc := range []struct {
name string
expected string
Expand Down

0 comments on commit 25d3ad5

Please sign in to comment.