Skip to content

Commit ad613a4

Browse files
refactor: minor refactoring
1 parent 5f7fb47 commit ad613a4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

e2e_tests/boundary_integration_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ func TestBoundaryIntegration(t *testing.T) {
197197
// It makes sure you can access this domain with curl tool (using both HTTP and HTTPS protocols).
198198
// It indirectly tests that ContentLength header is properly set, otherwise it fails.
199199
func TestContentLengthHeader(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>
201+
`
202+
200203
// Find project root by looking for go.mod file
201204
projectRoot := findProjectRoot(t)
202205

@@ -246,8 +249,6 @@ func TestContentLengthHeader(t *testing.T) {
246249
}
247250

248251
// Verify response contains expected content
249-
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>
250-
`
251252
require.Equal(t, expectedResponse, string(output))
252253
})
253254

@@ -270,8 +271,6 @@ func TestContentLengthHeader(t *testing.T) {
270271
}
271272

272273
// Verify response contains expected content
273-
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>
274-
`
275274
require.Equal(t, expectedResponse, string(output))
276275
})
277276

0 commit comments

Comments
 (0)