mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 10:15:22 +00:00
test: add empty list test
This commit is contained in:
@@ -211,4 +211,20 @@ spec:
|
||||
ports:
|
||||
- containerPort: 80
|
||||
`)
|
||||
}
|
||||
|
||||
// Empty list should result in no resources
|
||||
func TestEmptyList(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
th.WriteK(".", `
|
||||
resources:
|
||||
- emptyList.yaml
|
||||
`)
|
||||
th.WriteF("emptyList.yaml", `
|
||||
apiVersion: v1
|
||||
kind: PodList
|
||||
items: []
|
||||
`)
|
||||
m := th.Run(".", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, "")
|
||||
}
|
||||
Reference in New Issue
Block a user