mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Adds commentary on expected/unexpected test output
This commit is contained in:
@@ -69,6 +69,9 @@ resources:
|
|||||||
`)
|
`)
|
||||||
|
|
||||||
m := th.Run(".", th.MakeDefaultOptions())
|
m := th.Run(".", th.MakeDefaultOptions())
|
||||||
|
|
||||||
|
// Everything is as expected: each CRB gets updated to reference the SA in the appropriate namespace
|
||||||
|
// Changing order in the root kustomization.yaml does not change the result, as expected
|
||||||
th.AssertActualEqualsExpected(m, `
|
th.AssertActualEqualsExpected(m, `
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
@@ -170,6 +173,9 @@ resources:
|
|||||||
`)
|
`)
|
||||||
|
|
||||||
m := th.Run(".", th.MakeDefaultOptions())
|
m := th.Run(".", th.MakeDefaultOptions())
|
||||||
|
|
||||||
|
// Unexpected result: crb-b's subject obtains the wrong namespace, having "namespace: a"
|
||||||
|
// If the order is swapped in the kustomization.yaml then it's crb-a that gets "namespace: b"
|
||||||
th.AssertActualEqualsExpected(m, `
|
th.AssertActualEqualsExpected(m, `
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
|
|||||||
Reference in New Issue
Block a user