mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
19 lines
375 B
Go
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("^()"), "")
|
|
}
|