Skip to content

Commit c5c6903

Browse files
test(store): a missing domain reads back as not found (#1944)
1 parent 639e284 commit c5c6903

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎internal/store/postgres/domain_repository_test.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"log/slog"
77
"testing"
88

9+
"github.com/google/uuid"
910
"github.com/ory/dockertest"
1011
"github.com/raystack/frontier/core/domain"
1112
"github.com/raystack/frontier/internal/store/postgres"
@@ -58,7 +59,10 @@ func (s *DomainRepositoryTestSuite) TestSkipsSoftDeletedDomains() {
5859
s.Require().NoError(err)
5960

6061
_, err = s.repository.Get(s.ctx, deleted.ID)
61-
s.Assert().Error(err)
62+
s.Assert().ErrorIs(err, domain.ErrNotExist)
63+
64+
_, err = s.repository.Get(s.ctx, uuid.NewString())
65+
s.Assert().ErrorIs(err, domain.ErrNotExist)
6266

6367
got, err := s.repository.List(s.ctx, domain.Filter{OrgID: s.orgID})
6468
s.Assert().NoError(err)

0 commit comments

Comments
 (0)