Skip to content

Commit

Permalink
tenant controller test
Browse files Browse the repository at this point in the history
  • Loading branch information
giacoliva committed Jan 12, 2024
1 parent 4c5b88a commit 79643eb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions operators/pkg/tenant-controller/autoenroll_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ var _ = Describe("Workspace AutoEnroll Update", func() {
const (
tenantName = "tester"
workspaceName = "foo"

labelkey = "crownlabs.polito.it/operator-selector"
labelvalue = "autoenroll-test"
)

BeforeEach(func() {
Expand All @@ -51,14 +54,12 @@ var _ = Describe("Workspace AutoEnroll Update", func() {
Email: "[email protected]",
},
}
tenant.Labels = map[string]string{"reconcile.crownlabs.polito.it": "true"}
workspace.Labels = map[string]string{"reconcile.crownlabs.polito.it": "true"}
tenant.Labels = map[string]string{labelkey: labelvalue}
workspace.Labels = map[string]string{labelkey: labelvalue}
tenant.Spec.Workspaces = []clv1alpha2.TenantWorkspaceEntry{{Name: workspaceName, Role: clv1alpha2.Candidate}}
})

JustBeforeEach(func() {
labelkey := "reconcile.crownlabs.polito.it"
labelvalue := "true"
cl = builder.WithObjects(&tenant, &workspace).Build()
tnReconciler = tntctrl.TenantReconciler{
Client: cl, Scheme: scheme.Scheme,
Expand Down

0 comments on commit 79643eb

Please sign in to comment.