Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestCreateIdentitySuccessfully(t *testing.T) {
ID: identityID,
ExternalID: externalTestID,
WorkspaceID: h.Resources().UserWorkspace.ID,
Meta: nil,
Meta: []byte("{}"),
CreatedAt: time.Now().UnixMilli(),
Environment: "default",
})
Expand All @@ -66,7 +66,7 @@ func TestCreateIdentitySuccessfully(t *testing.T) {
ID: identityID,
ExternalID: externalTestID,
WorkspaceID: h.Resources().UserWorkspace.ID,
Meta: nil,
Meta: []byte("{}"),
CreatedAt: time.Now().UnixMilli(),
Environment: "default",
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (h *Handler) Handle(ctx context.Context, s *zen.Session) error {
return err
}

var meta []byte
meta := []byte("{}")
if req.Meta != nil {
rawMeta, metaErr := json.Marshal(req.Meta)
if metaErr != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func createTestIdentity(t *testing.T, h *testutil.Harness, numberOfRatelimits in
ID: identityID,
ExternalID: externalID,
WorkspaceID: h.Resources().UserWorkspace.ID,
Meta: nil,
Meta: []byte("{}"),
CreatedAt: time.Now().UnixMilli(),
Environment: "default",
})
Expand Down Expand Up @@ -270,7 +270,7 @@ func TestDeleteIdentitySuccess(t *testing.T) {
ID: newIdentityID,
ExternalID: testIdentity.ExternalID,
WorkspaceID: h.Resources().UserWorkspace.ID,
Meta: nil,
Meta: []byte("{}"),
CreatedAt: time.Now().UnixMilli(),
Environment: "default",
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestDeleteIdentityForbidden(t *testing.T) {
WorkspaceID: h.Resources().UserWorkspace.ID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestDeleteIdentityNotFound(t *testing.T) {
WorkspaceID: h.Resources().UserWorkspace.ID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -115,7 +115,7 @@ func TestDeleteIdentityNotFound(t *testing.T) {
WorkspaceID: h.Resources().UserWorkspace.ID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -150,7 +150,7 @@ func TestDeleteIdentityNotFound(t *testing.T) {
WorkspaceID: h.Resources().UserWorkspace.ID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -198,7 +198,7 @@ func TestDeleteIdentityNotFound(t *testing.T) {
WorkspaceID: differentWorkspace.ID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
12 changes: 6 additions & 6 deletions go/apps/api/routes/v2_identities_get_identity/200_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func TestSuccess(t *testing.T) {

Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -206,7 +206,7 @@ func TestSuccess(t *testing.T) {

Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -240,7 +240,7 @@ func TestSuccess(t *testing.T) {

Environment: customEnvironment,
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -374,7 +374,7 @@ func TestSuccess(t *testing.T) {

Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -454,7 +454,7 @@ func TestSuccess(t *testing.T) {
WorkspaceID: h.Resources().UserWorkspace.ID,
Environment: "default",
CreatedAt: creationTime,
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down Expand Up @@ -491,7 +491,7 @@ func TestSuccess(t *testing.T) {

Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
2 changes: 2 additions & 0 deletions go/apps/api/routes/v2_identities_get_identity/403_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func TestForbidden(t *testing.T) {
WorkspaceID: workspaceID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand All @@ -62,6 +63,7 @@ func TestForbidden(t *testing.T) {
WorkspaceID: workspaceID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func TestNotFound(t *testing.T) {
WorkspaceID: h.Resources().UserWorkspace.ID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func TestForbidden(t *testing.T) {
WorkspaceID: workspaceID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand All @@ -58,6 +59,7 @@ func TestForbidden(t *testing.T) {
WorkspaceID: workspaceID,
Environment: "production",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand All @@ -69,6 +71,7 @@ func TestForbidden(t *testing.T) {
WorkspaceID: workspaceID,
Environment: "staging",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func TestCrossWorkspaceForbidden(t *testing.T) {
WorkspaceID: workspaceB,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestSuccess(t *testing.T) {
WorkspaceID: workspaceID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: nil,
Meta: []byte("{}"),
})
require.NoError(t, err)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func TestForbidden(t *testing.T) {
WorkspaceID: workspaceID,
Environment: "default",
CreatedAt: time.Now().UnixMilli(),
Meta: []byte("{}"),
})
require.NoError(t, err)
err = tx.Commit()
Expand Down
33 changes: 17 additions & 16 deletions go/pkg/db/audit_log_insert.sql_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions go/pkg/db/audit_log_target_insert.sql_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions go/pkg/db/identity_insert.sql_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading