Skip to content

Commit

Permalink
Exclude deleted projections (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
jastBytes authored Aug 17, 2022
1 parent 1043551 commit ad5c5da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/domain/repositories/cluster_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NewClusterRepository(repository es.Repository[*projections.Cluster]) Cluste

// ByClusterName searches for a cluster projection by its name.
func (r *clusterRepository) ByClusterName(ctx context.Context, clusterName string) (*projections.Cluster, error) {
ps, err := r.AllWith(ctx, true)
ps, err := r.AllWith(ctx, false)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/domain/repositories/tenant_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NewTenantRepository(repository es.Repository[*projections.Tenant]) TenantRe

// ByName searches for a tenant projection by its name.
func (r *tenantRepository) ByName(ctx context.Context, name string) (*projections.Tenant, error) {
ps, err := r.AllWith(ctx, true)
ps, err := r.AllWith(ctx, false)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ var _ = Describe("internal/integration_test", func() {
g.Expect(err).ToNot(HaveOccurred())
g.Expect(tenant).ToNot(BeNil())
g.Expect(tenant.Metadata.Deleted).NotTo(BeNil())
}).Should(Succeed())
}).ShouldNot(Succeed())

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

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

0 comments on commit ad5c5da

Please sign in to comment.