diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa43a60..65fc796 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: test: stage: test - image: golang:1.17 + image: golang:1.18 only: refs: - main diff --git a/cmd/mothd/httpd_test.go b/cmd/mothd/httpd_test.go index fc4ae9a..f5482d2 100644 --- a/cmd/mothd/httpd_test.go +++ b/cmd/mothd/httpd_test.go @@ -33,7 +33,9 @@ func (hs *HTTPServer) TestRequest(path string, args map[string]string) *httptest } func TestHttpd(t *testing.T) { - hs := NewHTTPServer("/", NewTestServer()) + server := NewTestServer() + hs := NewHTTPServer("/", server) + stateProvider := server.State.(*State) if r := hs.TestRequest("/", nil); r.Result().StatusCode != 200 { t.Error(r.Result()) @@ -113,6 +115,7 @@ func TestHttpd(t *testing.T) { } time.Sleep(TestMaintenanceInterval) + stateProvider.refresh() if r := hs.TestRequest("/content/pategory/2/puzzle.json", nil); r.Result().StatusCode != 200 { t.Error(r.Result())