Skip to content

Commit 69e2c71

Browse files
committed
acceptance: rename StartBlockingProxy to StartRejectingProxy
Co-authored-by: Denis Bilenko <denis.bilenko@databricks.com>
1 parent 5517b60 commit 69e2c71

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

acceptance/acceptance_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
333333
const sharedProxyHint = "; re-run with -debugsandbox to see which test caused this"
334334
sandboxProxyURL := ""
335335
if cloudEnv == "" && !DebugSandbox {
336-
sandboxProxyURL = internal.StartBlockingProxy(t, sharedProxyHint)
336+
sandboxProxyURL = internal.StartRejectingProxy(t, sharedProxyHint)
337337
}
338338

339339
setReplsForTestEnvVars(t, &repls)
@@ -771,7 +771,7 @@ func runTest(t *testing.T,
771771
if DebugSandbox {
772772
// Per-test proxy: errors are attributed to this subtest's t, making
773773
// it immediately clear which test caused the internet access.
774-
proxyURL = internal.StartBlockingProxy(t, "")
774+
proxyURL = internal.StartRejectingProxy(t, "")
775775
}
776776
// Only block HTTPS: the local test server is plain HTTP (http://127.0.0.1:PORT)
777777
// so HTTP_PROXY would intercept its traffic. All real external calls use HTTPS.

acceptance/internal/rejecting_proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010
)
1111

12-
// StartBlockingProxy starts an HTTP proxy server bound to a loopback port and
12+
// StartRejectingProxy starts an HTTP proxy server bound to a loopback port and
1313
// returns its URL for use as HTTPS_PROXY. Every proxied request receives a
1414
// 400 Bad Request response so the client gets a clear HTTP error instead of a
1515
// TCP reset (a reset would trigger the SDK's 5-minute retry loop).
@@ -21,7 +21,7 @@ import (
2121
// hint is appended to the t.Errorf message for real hosts. Pass a non-empty
2222
// hint when using a shared proxy to tell the user how to get per-test
2323
// attribution (e.g. "re-run with -debugsandbox").
24-
func StartBlockingProxy(t *testing.T, hint string) string {
24+
func StartRejectingProxy(t *testing.T, hint string) string {
2525
ln, err := net.Listen("tcp", "127.0.0.1:0")
2626
if err != nil {
2727
t.Fatalf("blocking proxy: listen: %v", err)

0 commit comments

Comments
 (0)