mirror of
https://github.com/kyverno/kyverno.git
synced 2025-01-20 18:52:16 +00:00
27e7b2d326
* 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>
16 lines
431 B
Go
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)
|
|
}
|