mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-29 21:31:48 +02:00
migrated from logrus to zerolog, improved error formatting, fixed concurrent map write, fixed crash on rapid page refresh for idle containers, fixed infinite recursion on gotfiy error, fixed websocket connection problem when using idlewatcher
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package fields
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
E "github.com/yusing/go-proxy/internal/error"
|
||||
U "github.com/yusing/go-proxy/internal/utils/testing"
|
||||
)
|
||||
|
||||
@@ -38,10 +38,10 @@ var invalidPatterns = []string{
|
||||
func TestPathPatternRegex(t *testing.T) {
|
||||
for _, pattern := range validPatterns {
|
||||
_, err := ValidatePathPattern(pattern)
|
||||
U.ExpectNoError(t, err.Error())
|
||||
U.ExpectNoError(t, err)
|
||||
}
|
||||
for _, pattern := range invalidPatterns {
|
||||
_, err := ValidatePathPattern(pattern)
|
||||
U.ExpectError2(t, pattern, E.ErrInvalid, err.Error())
|
||||
U.ExpectTrue(t, errors.Is(err, ErrInvalidPathPattern))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user