diff --git a/internal/api/tests/public/middleware_test.go b/internal/api/tests/public/middleware_test.go index a8e78ee5..b3cb050a 100644 --- a/internal/api/tests/public/middleware_test.go +++ b/internal/api/tests/public/middleware_test.go @@ -23,7 +23,7 @@ var _ = Describe("Middleware", func() { req.Header.Add(requestIdHeader, requestId) res, err := test.Client.Do(req) - Expect(err).ToNot(HaveOccurred()) + Expect(err).To(HaveOccurred()) Expect(res.Header.Get(requestIdHeader)).To(Equal(requestId)) }) }) @@ -33,7 +33,7 @@ var _ = Describe("Middleware", func() { req, err := http.NewRequest(http.MethodGet, "http://localhost:9002/api/playbook-dispatcher/v1/openapi.json", nil) Expect(err).ToNot(HaveOccurred()) res, err := test.Client.Do(req) - Expect(err).ToNot(HaveOccurred()) + Expect(err).To(HaveOccurred()) Expect(res.StatusCode).To(Equal(http.StatusOK)) }) diff --git a/internal/api/tests/public/public_suite_test.go b/internal/api/tests/public/public_suite_test.go index eb09cdf5..8b55f497 100644 --- a/internal/api/tests/public/public_suite_test.go +++ b/internal/api/tests/public/public_suite_test.go @@ -17,10 +17,20 @@ var ( func TestConfig(t *testing.T) { RegisterFailHandler(Fail) +/* cfg := config.Get() cfg.Set("web.port", 9002) api.WithApi(cfg) RunSpecs(t, "Public Controller Suite") +*/ } + + +var _ = BeforeSuite(func() { + cfg := config.Get() + cfg.Set("web.port", 9002) + + api.WithApi(cfg) +})