1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 07:57:07 +00:00
kyverno/pkg/webhookconfig/configmanager_test.go

17 lines
431 B
Go
Raw Normal View History

package webhookconfig
import (
"testing"
kyverno "github.com/kyverno/kyverno/api/kyverno/v1"
"gotest.tools/assert"
)
func Test_webhook_isEmpty(t *testing.T) {
empty := newWebhook(kindMutating, DefaultWebhookTimeout, kyverno.Ignore)
assert.Equal(t, empty.isEmpty(), true)
notEmpty := newWebhook(kindMutating, DefaultWebhookTimeout, kyverno.Ignore)
setWildcardConfig(notEmpty)
assert.Equal(t, notEmpty.isEmpty(), false)
}