1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix tests

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
This commit is contained in:
Jim Bugwadia 2021-03-25 18:11:32 -07:00
parent 8d03f8c59e
commit 72cdbafbae

View file

@ -2,8 +2,8 @@ package variables
import (
"encoding/json"
"strings"
"fmt"
"strings"
"testing"
"github.com/kyverno/kyverno/pkg/engine/context"
@ -172,7 +172,7 @@ func Test_ReplacingPathWhenDeleting(t *testing.T) {
err = ctx.AddJSON(resourceRaw)
assert.NilError(t, err)
pattern, err = SubstituteVars(log.Log, ctx, pattern)
pattern, err = SubstituteAll(log.Log, ctx, pattern)
assert.NilError(t, err)
assert.Equal(t, fmt.Sprintf("%v", pattern), "bar")
@ -208,7 +208,7 @@ func Test_ReplacingNestedVariableWhenDeleting(t *testing.T) {
err = ctx.AddJSON(resourceRaw)
assert.NilError(t, err)
pattern, err = SubstituteVars(log.Log, ctx, pattern)
pattern, err = SubstituteAll(log.Log, ctx, pattern)
assert.NilError(t, err)
assert.Equal(t, fmt.Sprintf("%v", pattern), "nested_target")