mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-06 01:54:43 +00:00
Add test for reading multiple Kustomizations in a single file
Signed-off-by: Marcel Boehm <marcel.boehm@inovex.de>
This commit is contained in:
parent
912718103c
commit
72a2866508
2 changed files with 28 additions and 0 deletions
|
|
@ -226,6 +226,16 @@ func Test_unMarshallKustomization(t *testing.T) {
|
|||
}
|
||||
})
|
||||
}
|
||||
t.Run("correct parsing of multiple documents", func(t *testing.T) {
|
||||
b.kustomizationFile = "testdata/local-kustomization/multi-doc-reset.yaml"
|
||||
ks, err := b.unMarshallKustomization()
|
||||
if err != nil {
|
||||
t.Errorf("unexpected err '%s'", err)
|
||||
}
|
||||
if len(ks.Spec.Components) > 0 {
|
||||
t.Errorf("previous Kustomization in file leaked into subsequent Kustomizations")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func Test_ResolveKustomization(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue