mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Simplify parsing
This commit is contained in:
@@ -195,13 +195,12 @@ func TestSourceCommandJSON(t *testing.T) {
|
||||
kind: ResourceList
|
||||
items:
|
||||
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/format: 'json', config.kubernetes.io/index: '0',
|
||||
config.kubernetes.io/path: 'f1.json'}}, "spec": {"replicas": 1}}
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0', config.kubernetes.io/path: 'f1.json'}},
|
||||
"spec": {"replicas": 1}}
|
||||
- {"apiVersion": "v1", "kind": "Abstraction", "metadata": {"name": "foo", "annotations": {
|
||||
"config.kubernetes.io/function": "container:\n image: gcr.io/example/reconciler:v1\n",
|
||||
"config.kubernetes.io/local-config": "true", config.kubernetes.io/format: 'json',
|
||||
config.kubernetes.io/index: '0', config.kubernetes.io/path: 'f2.json'}}, "spec": {
|
||||
"replicas": 3}}
|
||||
"config.kubernetes.io/local-config": "true", config.kubernetes.io/index: '0',
|
||||
config.kubernetes.io/path: 'f2.json'}}, "spec": {"replicas": 3}}
|
||||
`, b.String()) {
|
||||
return
|
||||
}
|
||||
@@ -309,8 +308,8 @@ func TestSourceCommandJSON_Stdin(t *testing.T) {
|
||||
kind: ResourceList
|
||||
items:
|
||||
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/format: 'json', config.kubernetes.io/index: '0'}},
|
||||
"spec": {"replicas": 1}}
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0'}}, "spec": {
|
||||
"replicas": 1}}
|
||||
`, out.String()) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user