Skip to content

Commit

Permalink
tests: fix channels repo tests
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Gateru <[email protected]>
  • Loading branch information
felixgateru committed Jan 23, 2025
1 parent d77d005 commit 0d98da9
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions channels/postgres/channels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var (
Metadata: map[string]interface{}{"key": "value"},
CreatedAt: time.Now().UTC().Truncate(time.Microsecond),
Status: clients.EnabledStatus,
ConnectionTypes: []connections.ConnType{},
}
validConnection = channels.Connection{
ClientID: testsutil.GenerateUUID(&testing.T{}),
Expand Down Expand Up @@ -438,6 +439,7 @@ func TestRetrieveAll(t *testing.T) {
Metadata: map[string]interface{}{"name": name},
CreatedAt: time.Now().UTC().Truncate(time.Microsecond),
Status: clients.EnabledStatus,
ConnectionTypes: []connections.ConnType{},
}
_, err := repo.Save(context.Background(), channel)
require.Nil(t, err, fmt.Sprintf("create channel unexpected error: %s", err))
Expand Down Expand Up @@ -1330,13 +1332,14 @@ func TestRetrieveParentGroupChannels(t *testing.T) {
for i := 0; i < 10; i++ {
name := namegen.Generate()
channel := channels.Channel{
ID: testsutil.GenerateUUID(t),
Domain: testsutil.GenerateUUID(t),
ParentGroup: parentID,
Name: name,
Metadata: map[string]interface{}{"name": name},
CreatedAt: time.Now().UTC().Truncate(time.Microsecond),
Status: clients.EnabledStatus,
ID: testsutil.GenerateUUID(t),
Domain: testsutil.GenerateUUID(t),
ParentGroup: parentID,
Name: name,
Metadata: map[string]interface{}{"name": name},
CreatedAt: time.Now().UTC().Truncate(time.Microsecond),
Status: clients.EnabledStatus,
ConnectionTypes: []connections.ConnType{},
}
items = append(items, channel)
}
Expand Down

0 comments on commit 0d98da9

Please sign in to comment.