Skip to content

Commit ad5c5da

Browse files
authored
Exclude deleted projections (#221)
1 parent 1043551 commit ad5c5da

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pkg/domain/repositories/cluster_repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func NewClusterRepository(repository es.Repository[*projections.Cluster]) Cluste
4242

4343
// ByClusterName searches for a cluster projection by its name.
4444
func (r *clusterRepository) ByClusterName(ctx context.Context, clusterName string) (*projections.Cluster, error) {
45-
ps, err := r.AllWith(ctx, true)
45+
ps, err := r.AllWith(ctx, false)
4646
if err != nil {
4747
return nil, err
4848
}

pkg/domain/repositories/tenant_repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func NewTenantRepository(repository es.Repository[*projections.Tenant]) TenantRe
4242

4343
// ByName searches for a tenant projection by its name.
4444
func (r *tenantRepository) ByName(ctx context.Context, name string) (*projections.Tenant, error) {
45-
ps, err := r.AllWith(ctx, true)
45+
ps, err := r.AllWith(ctx, false)
4646
if err != nil {
4747
return nil, err
4848
}

test/integration/integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ var _ = Describe("internal/integration_test", func() {
306306
g.Expect(err).ToNot(HaveOccurred())
307307
g.Expect(tenant).ToNot(BeNil())
308308
g.Expect(tenant.Metadata.Deleted).NotTo(BeNil())
309-
}).Should(Succeed())
309+
}).ShouldNot(Succeed())
310310

311311
By("recreating the tenant after deletion")
312312
command, err = cmd.AddCommandData(
@@ -396,7 +396,7 @@ var _ = Describe("internal/integration_test", func() {
396396
g.Expect(err).ToNot(HaveOccurred())
397397
g.Expect(cluster).ToNot(BeNil())
398398
g.Expect(cluster.Metadata.Deleted).NotTo(BeNil())
399-
}).Should(Succeed())
399+
}).ShouldNot(Succeed())
400400

401401
By("recreating the cluster after deletion")
402402
command, err = cmd.AddCommandData(

0 commit comments

Comments
 (0)