Skip to content

Commit

Permalink
Fix linters
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Gershkovich <[email protected]>
  • Loading branch information
ELENAGER committed Dec 27, 2023
1 parent 7264735 commit 935ac2e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions controllers/drplacementcontrol_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func resetClusterDown() {
}

//nolint:funlen,cyclop,gocognit
func (FakeMCVGetter) GetVRGFromManagedCluster(_, _, managedCluster string,
func (FakeMCVGetter) GetVRGFromManagedCluster(_, resourceNamespace, managedCluster string,
_ map[string]string,
) (*rmn.VolumeReplicationGroup, error) {
conType := controllers.VRGConditionTypeDataReady
Expand Down Expand Up @@ -1167,7 +1167,7 @@ const (
UsePlacementWithAppSet = 3
)

func InitialDeploymentAsync(namespace, placementName string, plType PlacementType) (
func InitialDeploymentAsync(namespace, placementName, homeCluster string, plType PlacementType) (
client.Object, *rmn.DRPlacementControl,
) {
createNamespacesAsync(getNamespaceObj(namespace))
Expand Down Expand Up @@ -1200,7 +1200,7 @@ func CreatePlacementAndDRPC(namespace, placementName, homeCluster string, plType
return placementObj, createDRPC(placementName, DRPCCommonName, namespace, AsyncDRPolicyName, homeCluster)
}

func FollowOnDeploymentAsync(namespace, placementName string) (*plrv1.PlacementRule,
func FollowOnDeploymentAsync(namespace, placementName, homeCluster string) (*plrv1.PlacementRule,
*rmn.DRPlacementControl,
) {
createNamespace(appNamespace2)
Expand Down Expand Up @@ -1638,7 +1638,7 @@ func createNamespacesSync() {
createNamespace(appNamespace)
}

func InitialDeploymentSync(namespace, placementName string) (*plrv1.PlacementRule,
func InitialDeploymentSync(namespace, placementName, homeCluster string) (*plrv1.PlacementRule,
*rmn.DRPlacementControl,
) {
createNamespacesSync()
Expand Down Expand Up @@ -1869,7 +1869,7 @@ var _ = Describe("DRPlacementControl Reconciler", func() {
By("Initial Deployment")
var placementObj client.Object
placementObj, drpc = InitialDeploymentAsync(
DefaultDRPCNamespace, UserPlacementRuleName, UsePlacementRule)
DefaultDRPCNamespace, UserPlacementRuleName, East1ManagedCluster, UsePlacementRule)
userPlacementRule = placementObj.(*plrv1.PlacementRule)
Expect(userPlacementRule).NotTo(BeNil())
verifyInitialDRPCDeployment(userPlacementRule, East1ManagedCluster)
Expand Down Expand Up @@ -1936,7 +1936,7 @@ var _ = Describe("DRPlacementControl Reconciler", func() {
})
When("A DRPC is created referring to a deleted DRPolicy", func() {
It("Should fail DRPC reconciliaiton and not add a finalizer", func() {
_, drpc2 := FollowOnDeploymentAsync(DRPC2NamespaceName, UserPlacementRuleName)
_, drpc2 := FollowOnDeploymentAsync(DRPC2NamespaceName, UserPlacementRuleName, East1ManagedCluster)
checkIfDRPCFinalizerNotAdded(drpc2)
Expect(k8sClient.Delete(context.TODO(), drpc2)).Should(Succeed())
})
Expand Down Expand Up @@ -1981,7 +1981,7 @@ var _ = Describe("DRPlacementControl Reconciler", func() {
By("Initial Deployment")
var placementObj client.Object
placementObj, drpc = InitialDeploymentAsync(
DefaultDRPCNamespace, UserPlacementName, UsePlacementWithSubscription)
DefaultDRPCNamespace, UserPlacementName, East1ManagedCluster, UsePlacementWithSubscription)
placement = placementObj.(*clrapiv1beta1.Placement)
Expect(placement).NotTo(BeNil())
verifyInitialDRPCDeployment(placement, East1ManagedCluster)
Expand Down Expand Up @@ -2057,7 +2057,7 @@ var _ = Describe("DRPlacementControl Reconciler", func() {
getBaseVRG(DefaultDRPCNamespace).ObjectMeta.Namespace = ApplicationNamespace
var placementObj client.Object
placementObj, drpc = InitialDeploymentAsync(
DefaultDRPCNamespace, UserPlacementName, UsePlacementWithAppSet)
DefaultDRPCNamespace, UserPlacementName, East1ManagedCluster, UsePlacementWithAppSet)
placement = placementObj.(*clrapiv1beta1.Placement)
Expect(placement).NotTo(BeNil())
verifyInitialDRPCDeployment(placement, East1ManagedCluster)
Expand Down Expand Up @@ -2141,7 +2141,7 @@ var _ = Describe("DRPlacementControl Reconciler", func() {
When("An Application is deployed for the first time", func() {
It("Should deploy to East1ManagedCluster", func() {
By("Initial Deployment")
userPlacementRule, _ = InitialDeploymentSync(DefaultDRPCNamespace, UserPlacementRuleName)
userPlacementRule, _ = InitialDeploymentSync(DefaultDRPCNamespace, UserPlacementRuleName, East1ManagedCluster)
verifyInitialDRPCDeployment(userPlacementRule, East1ManagedCluster)
verifyDRPCOwnedByPlacement(userPlacementRule, getLatestDRPC(DefaultDRPCNamespace))
})
Expand Down Expand Up @@ -2217,7 +2217,7 @@ var _ = Describe("DRPlacementControl Reconciler", func() {
When("An Application is deployed for the first time", func() {
It("Should deploy to East1ManagedCluster", func() {
By("Initial Deployment")
userPlacementRule, _ = InitialDeploymentSync(DefaultDRPCNamespace, UserPlacementRuleName)
userPlacementRule, _ = InitialDeploymentSync(DefaultDRPCNamespace, UserPlacementRuleName, East1ManagedCluster)
verifyInitialDRPCDeployment(userPlacementRule, East1ManagedCluster)
verifyDRPCOwnedByPlacement(userPlacementRule, getLatestDRPC(DefaultDRPCNamespace))
})
Expand Down

0 comments on commit 935ac2e

Please sign in to comment.