Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
  • Loading branch information
JimBugwadia committed Mar 26, 2021
1 parent 8d03f8c commit 72cdbaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/engine/variables/vars_test.go
Expand Up @@ -2,8 +2,8 @@ package variables

import (
"encoding/json"
"strings"
"fmt"
"strings"
"testing"

"github.com/kyverno/kyverno/pkg/engine/context"
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 72cdbaf

Please sign in to comment.