1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/pkg/engine/mutate/utils_test.go
2020-01-07 17:06:17 -08:00

19 lines
375 B
Go

package mutate
import (
"testing"
"gotest.tools/assert"
)
func TestRemoveAnchor_ConditionAnchor(t *testing.T) {
assert.Equal(t, removeAnchor("(abc)"), "abc")
}
func TestRemoveAnchor_ExistanceAnchor(t *testing.T) {
assert.Equal(t, removeAnchor("^(abc)"), "abc")
}
func TestRemoveAnchor_EmptyExistanceAnchor(t *testing.T) {
assert.Equal(t, removeAnchor("^()"), "")
}