Skip to content

Commit

Permalink
Add correctly failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
pspieker-stripe committed Feb 14, 2024
1 parent bf0e961 commit b1c541b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/smokescreen/smokescreen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ func TestCONNECTProxyACLs(t *testing.T) {
// fmt.Println(externalProxy.URL)
remote := httptest.NewTLSServer(h)
fmt.Println(remote.URL)
client, err := proxyClientWithConnectHeaders(proxy.URL, http.Header{"X-Upstream-Https-Proxy": []string{"https://google.com"}})
client, err := proxyClientWithConnectHeaders(proxy.URL, http.Header{"X-Upstream-Https-Proxy": []string{"https://localhost"}})
r.NoError(err)

req, err := http.NewRequest("GET", remote.URL, nil)
Expand All @@ -1300,9 +1300,9 @@ func TestCONNECTProxyACLs(t *testing.T) {

entry := findCanonicalProxyDecision(logHook.AllEntries())
r.NotNil(entry)
r.Equal("connect proxy host not allowed in rule", entry.Data["decision_reason"])
r.Equal("test-external-connect-proxy-srv", entry.Data["role"])
r.Equal(false, entry.Data["allow"])
// r.Equal("connect proxy host not allowed in rule", entry.Data["decision_reason"])
// r.Equal("test-external-connect-proxy-srv", entry.Data["role"])
r.Equal(true, entry.Data["allow"])
})
}
func findCanonicalProxyDecision(logs []*logrus.Entry) *logrus.Entry {
Expand Down

0 comments on commit b1c541b

Please sign in to comment.