@@ -107,16 +107,17 @@ func TestBoundaryIntegration(t *testing.T) {
107
107
require .Equal (t , expectedResponse , string (output ))
108
108
})
109
109
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
+ })
120
121
121
122
// Clean up
122
123
cancel () // This will terminate the boundary process
0 commit comments