Add integration test for custom domain (#90)

and some nits

---
close #89

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/90
This commit is contained in:
6543 2022-06-13 14:43:49 +02:00
parent 38fb28f84f
commit 913f762eb0
3 changed files with 23 additions and 5 deletions

View file

@ -16,14 +16,14 @@ import (
)
func TestMain(m *testing.M) {
log.Printf("=== TestMain: START Server ==\n")
log.Printf("=== TestMain: START Server ===\n")
serverCtx, serverCancel := context.WithCancel(context.Background())
if err := startServer(serverCtx); err != nil {
log.Fatal().Msgf("could not start server: %v", err)
}
defer func() {
serverCancel()
log.Printf("=== TestMain: Server STOPED ==\n")
log.Printf("=== TestMain: Server STOPED ===\n")
}()
time.Sleep(20 * time.Second)