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

Remove spurious prints and fix line endings (#2963)

Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
This commit is contained in:
Sambhav Kothari 2022-01-11 14:15:26 +00:00 committed by GitHub
parent 037a320fba
commit baf4fa335b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 7 deletions

View file

@ -59,11 +59,9 @@ func Test_ParseJsonSerde(t *testing.T) {
for _, tc := range testCases {
t.Run(tc, func(t *testing.T) {
jp, err := New(fmt.Sprintf(`to_string(parse_json('%s'))`, tc))
fmt.Println(err)
assert.NilError(t, err)
result, err := jp.Search("")
fmt.Println(err)
assert.NilError(t, err)
assert.Equal(t, result, tc)
@ -93,11 +91,9 @@ func Test_ParseJsonComplex(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.input, func(t *testing.T) {
jp, err := New(tc.input)
fmt.Println(err)
assert.NilError(t, err)
result, err := jp.Search("")
fmt.Println(err)
assert.NilError(t, err)
assert.Equal(t, result, tc.expectedResult)

View file

@ -94,4 +94,4 @@ spec:
conditions:
- key: "{{request.object.metadata.annotations.test | parse_json(@).a }}"
operator: NotEquals
value: b
value: b

View file

@ -66,4 +66,4 @@ metadata:
name: invalid-test
annotations:
test: |
{"a": "not-b"}
{"a": "not-b"}

View file

@ -38,4 +38,4 @@ results:
rule: test-json-parsing-jmespath
resource: invalid-test
kind: ConfigMap
result: fail
result: fail