Skip to content

Commit

Permalink
fix: solving test
Browse files Browse the repository at this point in the history
  • Loading branch information
javip97 committed Nov 21, 2023
1 parent dc38a94 commit 37f8130
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions internal/db/tests/connections_fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import (
func (f *Fixture) CreateConnection(t *testing.T, conn *domain.Connection) uuid.UUID {
t.Helper()
ctx := context.Background()
if conn.ID == uuid.Nil {
conn.ID = uuid.New()
}
id, err := f.connectionsRepository.Save(ctx, f.storage.Pgx, conn)
assert.NoError(t, err)
return id
Expand Down
4 changes: 2 additions & 2 deletions internal/repositories/tests/connections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ func TestSaveUserAuthentication(t *testing.T) {
connectionsRepo := repositories.NewConnections()
fixture := tests.NewFixture(storage)

issuerDID, err := w3c.ParseDID("did:polygonid:polygon:main:2qKDJmySKNi4GD4vYdqfLb37MSTSijg77NoRZaKfDX")
issuerDID, err := w3c.ParseDID("did:polygonid:ethereum:main:2qKDJmySKNi4GD4vYdqfLb37MSTSijg77NoRZaKfDX")
require.NoError(t, err)
userDID, err := w3c.ParseDID("did:polygonid:polygon:main:2qH7XAwYQzCp9VfhpNgeLtK2iCehDDrfMWUCEg5ig5")
userDID, err := w3c.ParseDID("did:polygonid:ethereum:main:2qH7XAwYQzCp9VfhpNgeLtK2iCehDDrfMWUCEg5ig5")
require.NoError(t, err)

connID := fixture.CreateConnection(t, &domain.Connection{
Expand Down

0 comments on commit 37f8130

Please sign in to comment.