feat: publish v1.0.0-rc.36-custom.1
This commit is contained in:
commit
3a7e8f3b54
2381 files changed
+551494
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPublicUpstreamErrorContent(t *testing.T) {
|
||||
got := publicUpstreamErrorContent(502)
|
||||
if strings.Contains(got, "example-provider") || strings.Contains(got, "provider") || strings.Contains(got, "upstream") {
|
||||
t.Fatalf("upstream details leaked: %q", got)
|
||||
}
|
||||
if !strings.Contains(got, "status_code=502") || !strings.Contains(got, publicUpstreamErrorMessage) {
|
||||
t.Fatalf("unexpected public error content: %q", got)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user