for yaml-formatted JSON6902 patches, convert first to json, then use the same code as for json-formatted JSON6902 patches

This commit is contained in:
David Schweikert
2018-10-05 21:47:20 +02:00
parent 489f6e2e67
commit 3d4bf3abbf
4 changed files with 11 additions and 197 deletions

View File

@@ -21,11 +21,14 @@ import (
"testing"
"github.com/evanphx/json-patch"
"sigs.k8s.io/kustomize/pkg/gvk"
"sigs.k8s.io/kustomize/pkg/resid"
"sigs.k8s.io/kustomize/pkg/resmap"
"sigs.k8s.io/kustomize/pkg/resource"
)
var deploy = gvk.Gvk{Group: "apps", Version: "v1", Kind: "Deployment"}
func TestJsonPatchJSONTransformer_Transform(t *testing.T) {
id := resid.NewResId(deploy, "deploy1")
base := resmap.ResMap{