Skip to content

Commit cbfcc69

Browse files
ci: fix ci
1 parent 502b73d commit cbfcc69

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

e2e_tests/boundary_integration_test.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package e2e_tests
22

33
import (
4+
"bytes"
45
"context"
56
"os"
67
"os/exec"
@@ -16,15 +17,15 @@ import (
1617
func findProjectRoot(t *testing.T) string {
1718
cwd, err := os.Getwd()
1819
require.NoError(t, err, "Failed to get current working directory")
19-
20+
2021
// Start from current directory and walk up until we find go.mod
2122
dir := cwd
2223
for {
2324
goModPath := filepath.Join(dir, "go.mod")
2425
if _, err := os.Stat(goModPath); err == nil {
2526
return dir
2627
}
27-
28+
2829
parent := filepath.Dir(dir)
2930
if parent == dir {
3031
// Reached filesystem root
@@ -62,7 +63,7 @@ func getNamespaceName(t *testing.T) string {
6263
func TestBoundaryIntegration(t *testing.T) {
6364
// Find project root by looking for go.mod file
6465
projectRoot := findProjectRoot(t)
65-
66+
6667
// Build the boundary binary
6768
buildCmd := exec.Command("go", "build", "-o", "/tmp/boundary-test", "./cmd/...")
6869
buildCmd.Dir = projectRoot
@@ -98,11 +99,16 @@ func TestBoundaryIntegration(t *testing.T) {
9899
t.Run("HTTPRequestThroughBoundary", func(t *testing.T) {
99100
// Run curl directly in the namespace using ip netns exec
100101
curlCmd := exec.Command("sudo", "ip", "netns", "exec", namespaceName,
101-
"curl", "-s", "http://jsonplaceholder.typicode.com/todos/1")
102+
"curl", "http://jsonplaceholder.typicode.com/todos/1")
102103

103-
// Capture output
104+
// Capture stderr separately
105+
var stderr bytes.Buffer
106+
curlCmd.Stderr = &stderr
104107
output, err := curlCmd.Output()
105-
require.NoError(t, err, "curl command failed")
108+
109+
if err != nil {
110+
t.Fatalf("curl command failed: %v, stderr: %s, output: %s", err, stderr.String(), string(output))
111+
}
106112

107113
// Verify response contains expected content
108114
expectedResponse := `{

0 commit comments

Comments
 (0)