Skip to content

Commit

Permalink
vrg: fix the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur committed Jan 22, 2025
1 parent 7e27219 commit 7078fc8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/controller/vrg_recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ var _ = Describe("VolumeReplicationGroupRecipe", func() {
}

recipeVolumesDefine(volumes(nssParameterRef))
recipeGroupsDefine(resources(nssParameterRef))
vrgRecipeParametersDefine(parameters)
recipeHooksDefine(hook(ns0ParameterRef))
})
Expand Down Expand Up @@ -496,6 +497,7 @@ var _ = Describe("VolumeReplicationGroupRecipe", func() {
BeforeEach(func() {
nsSlices(1, 2)
vrg.Namespace = nsNamesSlice[0]
recipeGroupsDefine(resources(vrg.Namespace))
})
It("includes only the VRG's namespace in its PVC selection", func() {
Expect(err).ToNot(HaveOccurred())
Expand All @@ -510,6 +512,7 @@ var _ = Describe("VolumeReplicationGroupRecipe", func() {
nsSlices(1, 2)
vrg.Namespace = nsNamesSlice[0]
recipeVolumesDefine(volumes(vrg.Namespace))
recipeGroupsDefine(resources(vrg.Namespace))
})
It("includes only it in its PVC selection", func() {
Expect(err).ToNot(HaveOccurred())
Expand Down Expand Up @@ -549,6 +552,8 @@ var _ = Describe("VolumeReplicationGroupRecipe", func() {
nsSlices(1, 2)
Expect(apiReader.Get(ctx, client.ObjectKeyFromObject(r), r)).To(Succeed())
recipeVolumesDefine(volumes(vrg.Namespace))
recipeGroupsDefine(resources(vrg.Namespace))
recipeCaptureWorkflowDefine(allGroupsAllHooksWorkflow())
Expect(k8sClient.Update(ctx, r)).To(Succeed())
})
It("includes only it in its PVC selection", func() {
Expand Down Expand Up @@ -587,6 +592,8 @@ var _ = Describe("VolumeReplicationGroupRecipe", func() {
Context("recovery hooks in the same namespace", func() {
BeforeEach(func() {
recipeHooksDefine(hook(vrg.Namespace))
recipeGroupsDefine(resources(vrg.Namespace))
recipeCaptureWorkflowDefine(allGroupsAllHooksWorkflow())
})
It("sets DataReady condition's message to something besides a recipe error", func() {
Eventually(vrgDataReadyConditionGet).ShouldNot(BeNil())
Expand Down

0 comments on commit 7078fc8

Please sign in to comment.