From cd93f0ed5136fee53cf123f19e97e569e1225c4e Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 2 Nov 2023 14:55:11 -0400 Subject: [PATCH] Fix upstream creds in test --- common_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common_test.go b/common_test.go index e687cde..313691f 100644 --- a/common_test.go +++ b/common_test.go @@ -212,13 +212,16 @@ func TestMain(m *testing.M) { }, } + upstreamBuf := make([]byte, base64.StdEncoding.EncodedLen(9)) + base64.StdEncoding.Encode(upstreamBuf, []byte("upstreamtest:upstreampass")) + caddyHTTPForwardProxyAuth = caddyTestServer{ addr: "127.0.69.73:6973", root: "./test/forwardproxy", proxyHandler: &Handler{ PACPath: defaultPACPath, ACL: []ACLRule{{Subjects: []string{"all"}, Allow: true}}, - AuthCredentials: [][]byte{buf}, + AuthCredentials: [][]byte{upstreamBuf}, AuthRequired: true, }, }