Skip to content

Commit

Permalink
chore: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cisse21 committed Mar 14, 2023
1 parent 94cec69 commit cb85f07
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion processor/stash/stash.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"golang.org/x/sync/errgroup"

"github.com/google/uuid"
"github.com/samber/lo"

"github.com/rudderlabs/rudder-server/config"
"github.com/rudderlabs/rudder-server/jobsdb"
"github.com/rudderlabs/rudder-server/services/fileuploader"
Expand All @@ -19,7 +21,6 @@ import (
"github.com/rudderlabs/rudder-server/utils/bytesize"
"github.com/rudderlabs/rudder-server/utils/logger"
"github.com/rudderlabs/rudder-server/utils/misc"
"github.com/samber/lo"
)

var (
Expand Down
14 changes: 14 additions & 0 deletions warehouse/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,21 @@ func TestGetConfigValue(t *testing.T) {
},
},
},
{
key: "u1",
value: "v1",
warehouse: model.Warehouse{
Source: backendconfig.SourceT{
ID: "source_id",
},
Destination: backendconfig.DestinationT{
ID: "destination_id",
Config: map[string]interface{}{},
},
},
},
}
config.Set("Warehouse.source_id.destination_id.u1", "v1")
for _, input := range inputs {
value := GetConfigValue(input.key, input.warehouse)
require.Equal(t, value, input.value)
Expand Down

0 comments on commit cb85f07

Please sign in to comment.