mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 13:56:57 +00:00
add integration test for custom domain
This commit is contained in:
parent
d0d5189753
commit
5a5a7274c2
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue