1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-01-20 18:52:16 +00:00
kyverno/pkg/webhookconfig/configmanager_test.go
Charles-Edouard Brétéché 27e7b2d326
refactor: webhookconfig package (part 3) (#3834)
* refactor: webhookconfig package (part 1)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

* refactor: webhook config package (part 2)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

* refactor: webhookconfig package (part 3)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-09 14:31:35 +00:00

16 lines
431 B
Go

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)
}