refactor Unmarshal Kustomization struct code

This commit is contained in:
yugo kobayashi
2022-12-13 20:36:26 +00:00
parent faddb49c89
commit 5fed0f76c8
21 changed files with 37 additions and 116 deletions

View File

@@ -20,6 +20,7 @@ spec:
- port: 7002
`
// This test may failed when running on package tests using the go command because `v444.333.222` is set on makefile.
func TestAddManagedbyLabel(t *testing.T) {
tests := []struct {
kustFile string
@@ -28,8 +29,6 @@ func TestAddManagedbyLabel(t *testing.T) {
}{
{
kustFile: `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service.yaml
`,
@@ -38,8 +37,6 @@ resources:
},
{
kustFile: `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service.yaml
buildMetadata: [managedByLabel]