Update test demonstrating bug to pass, update comments

This commit is contained in:
Katrina Verey
2021-12-22 14:53:50 -05:00
parent 4079056501
commit d701792aa1

View File

@@ -532,7 +532,7 @@ metadata:
`) `)
} }
func TestUnrelatedNameReferenceReplacementIssue4054(t *testing.T) { func TestUnrelatedNameReferenceReplacement_Issue4254_Issue3418(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
// The cluster-autoscaler lease name should not be changed. // The cluster-autoscaler lease name should not be changed.
@@ -557,21 +557,20 @@ configMapGenerator:
literals: literals:
- AWS_REGION="us-east-1" - AWS_REGION="us-east-1"
`) `)
// The resourceNames for the leases resource in the ClusterRole should not be // The resourceNames for the leases resource in the ClusterRole should NOT be
// updated with the name suffix, because it's not targeting the generated // updated with the name suffix, because it's not targeting the generated
// configmap // configmap. The value at rules[0].resourceNames[0] is currently incorrect.
m := th.Run(".", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
labels: null
name: cluster-autoscaler name: cluster-autoscaler
rules: rules:
- apiGroups: - apiGroups:
- coordination.k8s.io - coordination.k8s.io
resourceNames: resourceNames:
- cluster-autoscaler - cluster-autoscaler-h8mmcct52k
resources: resources:
- leases - leases
verbs: verbs: