From 5a5a7274c220053c679ad1c01a7825c6e930990e Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 13 Jun 2022 13:47:11 +0200 Subject: [PATCH] add integration test for custom domain --- integration/get_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/integration/get_test.go b/integration/get_test.go index ef00531..04dc753 100644 --- a/integration/get_test.go +++ b/integration/get_test.go @@ -49,6 +49,16 @@ func TestGetContent(t *testing.T) { assert.True(t, getSize(resp.Body) > 1000) } +func TestCustomDomain(t *testing.T) { + resp, err := getTestHTTPSClient().Get("https://mock-pages.codeberg-test.org:4430/README.md") + assert.NoError(t, err) + if !assert.EqualValues(t, http.StatusOK, resp.StatusCode) { + t.FailNow() + } + assert.EqualValues(t, "text/html; charset=utf-8", resp.Header["Content-Type"][0]) + assert.EqualValues(t, 106, getSize(resp.Body)) +} + func TestGetNotFound(t *testing.T) { log.Printf("== TestGetNotFound ==\n") // test custom not found pages