config: fix policy matching for regular expressions (#2966)

* config: fix policy matching for regular expressions

* compile regex in validate, add test

* fix test
This commit is contained in:
Caleb Doxsey 2022-01-25 08:48:40 -07:00 committed by GitHub
parent 8e8c9c2f16
commit ace5bbb89a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 66 additions and 8 deletions

View file

@ -17,7 +17,7 @@ import (
"github.com/stretchr/testify/require"
)
var cmpOptIgnoreUnexported = cmpopts.IgnoreUnexported(Options{})
var cmpOptIgnoreUnexported = cmpopts.IgnoreUnexported(Options{}, Policy{})
func Test_Validate(t *testing.T) {
t.Parallel()