Skip to content

Commit 6992cb3

Browse files
fix last test
1 parent 1ee445b commit 6992cb3

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

e2e_tests/boundary_integration_test.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,17 @@ func TestBoundaryIntegration(t *testing.T) {
107107
require.Equal(t, expectedResponse, string(output))
108108
})
109109

110-
//// Test blocked domain (from inside the jail)
111-
//t.Run("BlockedDomainTest", func(t *testing.T) {
112-
// // Run curl directly in the namespace using ip netns exec
113-
// curlCmd := exec.Command("sudo", "ip", "netns", "exec", namespaceName,
114-
// "curl", "-s", "http://example.com")
115-
//
116-
// // This should fail
117-
// _, err := curlCmd.Output()
118-
// require.Error(t, err, "Expected blocked domain to fail")
119-
//})
110+
// Test blocked domain (from inside the jail)
111+
t.Run("BlockedDomainTest", func(t *testing.T) {
112+
// Run curl directly in the namespace using ip netns exec
113+
curlCmd := exec.Command("sudo", "ip", "netns", "exec", namespaceName,
114+
"curl", "-s", "http://example.com")
115+
116+
// This should fail
117+
output, err := curlCmd.Output()
118+
require.NoError(t, err, "curl command failed")
119+
require.Contains(t, string(output), "Request Blocked by Boundary")
120+
})
120121

121122
// Clean up
122123
cancel() // This will terminate the boundary process

0 commit comments

Comments
 (0)