From bec7d44dc7bd1ca11e608f6a336ca47b75163cc7 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Wed, 24 May 2023 18:40:24 -0700 Subject: [PATCH] test --- packages/eventindexer/http/server_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/eventindexer/http/server_test.go b/packages/eventindexer/http/server_test.go index 42f726421cf..a732f1a2f89 100644 --- a/packages/eventindexer/http/server_test.go +++ b/packages/eventindexer/http/server_test.go @@ -42,14 +42,25 @@ func Test_NewServer(t *testing.T) { Echo: echo.New(), EventRepo: &repo.EventRepository{}, CorsOrigins: make([]string, 0), + StatRepo: &repo.StatRepository{}, }, nil, }, + { + "noStatRepo", + NewServerOpts{ + Echo: echo.New(), + EventRepo: &repo.EventRepository{}, + CorsOrigins: make([]string, 0), + }, + eventindexer.ErrNoStatRepository, + }, { "noEventRepo", NewServerOpts{ Echo: echo.New(), CorsOrigins: make([]string, 0), + StatRepo: &repo.StatRepository{}, }, eventindexer.ErrNoEventRepository, }, @@ -58,6 +69,7 @@ func Test_NewServer(t *testing.T) { NewServerOpts{ Echo: echo.New(), EventRepo: &repo.EventRepository{}, + StatRepo: &repo.StatRepository{}, }, eventindexer.ErrNoCORSOrigins, }, @@ -66,6 +78,7 @@ func Test_NewServer(t *testing.T) { NewServerOpts{ EventRepo: &repo.EventRepository{}, CorsOrigins: make([]string, 0), + StatRepo: &repo.StatRepository{}, }, ErrNoHTTPFramework, },