mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Using single quote style when setting annotations
Annotations must be strings. Use single-quote style so tools don't get confused about the type.
This commit is contained in:
@@ -637,12 +637,12 @@ func TestSetAnnotation_Fn(t *testing.T) {
|
||||
kind: Deployment`))
|
||||
|
||||
rn := assertNoError(t)(r0.Pipe(SetAnnotation("a.b.c", "d.e.f")))
|
||||
assert.Equal(t, "d.e.f\n", assertNoErrorString(t)(rn.String()))
|
||||
assert.Equal(t, "'d.e.f'\n", assertNoErrorString(t)(rn.String()))
|
||||
assert.Equal(t, `apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
a.b.c: d.e.f
|
||||
a.b.c: 'd.e.f'
|
||||
`, assertNoErrorString(t)(r0.String()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user