mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Don't swallow error in SM patch and use new RNode Map method.
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/yaml.v3"
|
||||
"sigs.k8s.io/kustomize/api/resid"
|
||||
kyaml "sigs.k8s.io/kustomize/kyaml/yaml"
|
||||
@@ -480,6 +481,10 @@ func TestGetSlice(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMapEmpty(t *testing.T) {
|
||||
assert.Equal(t, 0, len(NewWNode().Map()))
|
||||
}
|
||||
|
||||
func TestMap(t *testing.T) {
|
||||
wn := NewWNode()
|
||||
if err := wn.UnmarshalJSON([]byte(deploymentLittleJson)); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user