Add tests for reading json

This commit is contained in:
Phillip Wittrock
2020-06-08 08:42:15 -07:00
parent 458a7c532c
commit 9a4acba118
2 changed files with 69 additions and 0 deletions

View File

@@ -298,6 +298,25 @@ metadata:
OmitReaderAnnotations: true,
SetAnnotations: map[string]string{"foo": "bar"}},
},
//
//
//
{
name: "json",
input: `
{
"a": "b",
"c": [1, 2]
}
`,
expectedItems: []string{
`
{"a": "b", "c": [1, 2], metadata: {annotations: {config.kubernetes.io/index: '0'}}}
`,
},
instance: ByteReader{},
},
}
for i := range testCases {