Skip to content

Commit 4fbcf7b

Browse files
ci: fix ci
1 parent cbfcc69 commit 4fbcf7b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

e2e_tests/boundary_integration_test.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,14 @@ func TestBoundaryIntegration(t *testing.T) {
127127
curlCmd := exec.Command("sudo", "ip", "netns", "exec", namespaceName,
128128
"env", "SSL_CERT_FILE=/home/coder/.config/coder_boundary/ca-cert.pem", "curl", "-s", "https://dev.coder.com/api/v2")
129129

130-
// Capture output
130+
// Capture stderr separately
131+
var stderr bytes.Buffer
132+
curlCmd.Stderr = &stderr
131133
output, err := curlCmd.Output()
132-
require.NoError(t, err, "curl command failed")
134+
135+
if err != nil {
136+
t.Fatalf("curl command failed: %v, stderr: %s, output: %s", err, stderr.String(), string(output))
137+
}
133138

134139
// Verify response contains expected content
135140
expectedResponse := `{"message":"👋"}
@@ -143,9 +148,14 @@ func TestBoundaryIntegration(t *testing.T) {
143148
curlCmd := exec.Command("sudo", "ip", "netns", "exec", namespaceName,
144149
"curl", "-s", "http://example.com")
145150

146-
// This should fail
151+
// Capture stderr separately
152+
var stderr bytes.Buffer
153+
curlCmd.Stderr = &stderr
147154
output, err := curlCmd.Output()
148-
require.NoError(t, err, "curl command failed")
155+
156+
if err != nil {
157+
t.Fatalf("curl command failed: %v, stderr: %s, output: %s", err, stderr.String(), string(output))
158+
}
149159
require.Contains(t, string(output), "Request Blocked by Boundary")
150160
})
151161

0 commit comments

Comments
 (0)