1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/engine/jmespath/new_test.go
Charles-Edouard Brétéché 376378fd09
test: add a couple unit tests (#6202)
* test: add a couple unit tests

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* more

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-02-03 05:37:31 +00:00

35 lines
511 B
Go

package jmespath
import (
"testing"
)
func TestNew(t *testing.T) {
type args struct {
query string
}
tests := []struct {
name string
args args
wantErr bool
}{
{
wantErr: true,
},
{
args: args{
query: "object.something",
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := New(tt.args.query)
if (err != nil) != tt.wantErr {
t.Errorf("New() error = %v, wantErr %v", err, tt.wantErr)
return
}
})
}
}