You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require.Contains(t, string(output), "Request Blocked by Boundary")
176
+
})
177
+
178
+
// Gracefully close process, call cleanup methods
179
+
err=boundaryCmd.Process.Signal(os.Interrupt)
180
+
require.NoError(t, err, "Failed to interrupt boundary process")
181
+
time.Sleep(time.Second*1)
182
+
183
+
// Clean up
184
+
cancel() // This will terminate the boundary process
185
+
err=boundaryCmd.Wait() // Wait for process to finish
186
+
iferr!=nil {
187
+
t.Logf("Boundary process finished with error: %v", err)
188
+
}
189
+
190
+
// Clean up binary
191
+
err=os.Remove("/tmp/boundary-test")
192
+
require.NoError(t, err, "Failed to remove /tmp/boundary-test")
193
+
}
194
+
195
+
// This test runs boundary process with such allowed domains:
196
+
// - example.com
197
+
// It makes sure you can access this domain with curl tool (using both HTTP and HTTPS protocols).
198
+
// It indirectly tests that ContentLength header is properly set, otherwise it fails.
199
+
funcTestContentLengthHeader(t*testing.T) {
200
+
expectedResponse:=`<!doctype html><html lang="en"><head><title>Example Domain</title><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.<p><a href="https://iana.org/domains/example">Learn more</a></div></body></html>
0 commit comments