Skip to content

Commit

Permalink
Remove unused flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrancisc committed Feb 1, 2024
1 parent 41ceda1 commit 42d5750
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion controllers/usersignup/spacebinding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestNewSpaceBinding(t *testing.T) {
// given
userSignup := commonsignup.NewUserSignup()
nsTemplateTier := tiertest.NewNSTemplateTier("advanced", "dev", "stage", "extra")
space := NewSpace(userSignup, test.MemberClusterName, "smith", nsTemplateTier.Name, false)
space := NewSpace(userSignup, test.MemberClusterName, "smith", nsTemplateTier.Name)
mur := newMasterUserRecord(userSignup, test.MemberClusterName, "deactivate90", "johny")

// when
Expand Down
2 changes: 1 addition & 1 deletion controllers/usersignup/usersignup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ func (r *Reconciler) ensureSpace(
}
tCluster := targetCluster(mur.Spec.UserAccounts[0].TargetCluster)

space = spaceutil.NewSpace(userSignup, tCluster.getClusterName(), mur.Name, spaceTier.Name, false)
space = spaceutil.NewSpace(userSignup, tCluster.getClusterName(), mur.Name, spaceTier.Name)

err = r.Client.Create(ctx, space)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions controllers/usersignup/usersignup_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ func TestUserSignupMUROrSpaceOrSpaceBindingCreateFails(t *testing.T) {
mur := newMasterUserRecord(userSignup, "member1", deactivate30Tier.Name, "foo")
mur.Labels = map[string]string{toolchainv1alpha1.MasterUserRecordOwnerLabelKey: userSignup.Name}

space := NewSpace(userSignup, "member1", "foo", "base", false)
space := NewSpace(userSignup, "member1", "foo", "base")

ready := NewGetMemberClusters(NewMemberClusterWithTenantRole(t, "member1", corev1.ConditionTrue))
initObjs := []runtime.Object{userSignup, baseNSTemplateTier, deactivate30Tier}
Expand Down Expand Up @@ -1849,7 +1849,7 @@ func TestUserSignupWithExistingMUROK(t *testing.T) {
},
}

space := NewSpace(userSignup, "member1", "foo", "base", false)
space := NewSpace(userSignup, "member1", "foo", "base")

spacebinding := spacebindingtest.NewSpaceBinding("foo", "foo", "admin", userSignup.Name)

Expand Down
3 changes: 1 addition & 2 deletions pkg/space/space.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// NewSpace creates a space CR for a UserSignup object.
func NewSpace(userSignup *toolchainv1alpha1.UserSignup, targetClusterName string, compliantUserName, tier string, disableInheritance bool) *toolchainv1alpha1.Space {
func NewSpace(userSignup *toolchainv1alpha1.UserSignup, targetClusterName string, compliantUserName, tier string) *toolchainv1alpha1.Space {
labels := map[string]string{
toolchainv1alpha1.SpaceCreatorLabelKey: userSignup.Name,
}
Expand All @@ -24,7 +24,6 @@ func NewSpace(userSignup *toolchainv1alpha1.UserSignup, targetClusterName string
TargetCluster: targetClusterName,
TargetClusterRoles: []string{cluster.RoleLabel(cluster.Tenant)}, // by default usersignups should be provisioned to tenant clusters
TierName: tier,
DisableInheritance: disableInheritance,
},
}
return space
Expand Down
2 changes: 1 addition & 1 deletion pkg/space/space_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestNewSpace(t *testing.T) {
userSignup := commonsignup.NewUserSignup()

// when
space := NewSpace(userSignup, test.MemberClusterName, "johny", "advanced", false)
space := NewSpace(userSignup, test.MemberClusterName, "johny", "advanced")

// then
expectedSpace := spacetest.NewSpace(test.HostOperatorNs, "johny",
Expand Down

0 comments on commit 42d5750

Please sign in to comment.