Kyaml anchor failure test.

This commit is contained in:
monopole
2021-08-03 13:58:53 -07:00
parent 54383bca25
commit 56da9a58fc
2 changed files with 107 additions and 0 deletions

View File

@@ -289,6 +289,34 @@ functionConfig:
`,
instance: kio.ByteReadWriter{FunctionConfig: yaml.MustParse(`c: d`)},
},
{
name: "anchors_not_inflated",
input: `
kind: ConfigMap
metadata:
name: foo
data:
color: &color-used blue
feeling: *color-used
`,
// If YAML anchors were automagically inflated,
// the expectedOutput would be something like
//
// kind: ConfigMap
// metadata:
// name: foo
// data:
// color: blue
// feeling: blue
expectedOutput: `
kind: ConfigMap
metadata:
name: foo
data:
color: &color-used blue
feeling: *color-used
`,
},
}
for i := range testCases {