Files
chorus/admin/common/middleware/security_test.go
T

15 lines
442 B
Go

package middleware
import "testing"
func TestChorusManagementPathIsExcludedFromGenericOperationLogs(t *testing.T) {
for _, path := range []string{"/api/v1/chorus", "/api/v1/chorus/providers", "/api/v1/chorus/providers/1/credential"} {
if !isChorusManagementPath(path) {
t.Fatalf("management path %q must be excluded", path)
}
}
if isChorusManagementPath("/api/v1/sys_user") {
t.Fatal("unrelated admin path must not match")
}
}