Skip to content

Commit

Permalink
chore: cleanup http handlers (#3767)
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr committed Aug 25, 2023
1 parent a7d7c74 commit 5dacdcf
Show file tree
Hide file tree
Showing 24 changed files with 2,315 additions and 685 deletions.
11 changes: 8 additions & 3 deletions warehouse/archive/archiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"testing"
"time"

backendConfig "github.com/rudderlabs/rudder-server/backend-config"

"github.com/rudderlabs/rudder-go-kit/config"

"github.com/golang/mock/gomock"
Expand Down Expand Up @@ -147,15 +149,18 @@ func TestArchiver(t *testing.T) {
`, tc.workspaceID, now)
require.NoError(t, err)

c := config.New()
c.Set("Warehouse.degradedWorkspaceIDs", tc.degradedWorkspaceIDs)

tenantManager := multitenant.New(c, backendConfig.DefaultBackendConfig)

archiver := archive.New(
config.Default,
logger.NOP,
mockStats,
pgResource.DB,
filemanager.New,
&multitenant.Manager{
DegradedWorkspaceIDs: tc.degradedWorkspaceIDs,
},
tenantManager,
)

ctx, cancel := context.WithCancel(context.Background())
Expand Down
4 changes: 1 addition & 3 deletions warehouse/backend_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ func TestBackendConfigManager(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

tenantManager = &multitenant.Manager{
BackendConfig: mockBackendConfig,
}
tenantManager = multitenant.New(config.Default, mockBackendConfig)

t.Run("Subscriptions", func(t *testing.T) {
bcm := newBackendConfigManager(c, db, tenantManager, logger.NOP)
Expand Down

0 comments on commit 5dacdcf

Please sign in to comment.