diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-24 13:46:55 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-24 13:46:55 +0300 |
commit | ccbe6b5ca4b56d4453567275b9232c58443d151e (patch) | |
tree | e8ac7245ad32b910ad4932b330453320ededb919 /acceptance_test.go | |
parent | 5ffd39e41866614de47ff427d3156062a6879e1c (diff) |
Add an acceptance test for broken domains source
Diffstat (limited to 'acceptance_test.go')
-rw-r--r-- | acceptance_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/acceptance_test.go b/acceptance_test.go index ec807d3d..fe598b0c 100644 --- a/acceptance_test.go +++ b/acceptance_test.go @@ -432,6 +432,18 @@ func TestPageNotAvailableIfNotLoaded(t *testing.T) { require.Equal(t, http.StatusServiceUnavailable, rsp.StatusCode) } +func TestPageNotAvailableInDomainSource(t *testing.T) { + skipUnlessEnabled(t) + teardown := RunPagesProcessWithoutWait(t, *pagesBinary, listeners, "", "-pages-root=shared/invalid-pages") + defer teardown() + waitForRoundtrips(t, listeners, 5*time.Second) + + rsp, err := GetPageFromListener(t, httpListener, "pages-broken-poc.gitlab.io", "index.html") + require.NoError(t, err) + defer rsp.Body.Close() + require.Equal(t, http.StatusBadGateway, rsp.StatusCode) +} + func TestObscureMIMEType(t *testing.T) { skipUnlessEnabled(t) teardown := RunPagesProcessWithoutWait(t, *pagesBinary, listeners, "") |