Skip to content

Commit

Permalink
e2e fix: restarting spiderpool-controller failed
Browse files Browse the repository at this point in the history
Signed-off-by: tao.yang <[email protected]>
  • Loading branch information
ty-dc committed Aug 4, 2024
1 parent 1138e66 commit 8d03168
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/e2e/reclaim/reclaim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ var _ = Describe("test ip with reclaim ip case", Label("reclaim"), func() {
Expect(err).NotTo(HaveOccurred())
Expect(spiderpoolControllerPodList).NotTo(BeNil(), "failed to get spiderpool controller podList \n")
Expect(spiderpoolControllerPodList.Items).NotTo(BeEmpty(), "failed to get spiderpool controller podList \n")
spiderpoolControllerPodList, err = frame.DeletePodListUntilReady(spiderpoolControllerPodList, common.PodReStartTimeout)
spiderpoolControllerPodList, err = frame.DeletePodListUntilReady(spiderpoolControllerPodList, common.PodReStartTimeout, &client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))})
Expect(err).NotTo(HaveOccurred())
Expect(spiderpoolControllerPodList).NotTo(BeNil(), "failed to get spiderpool controller podList after restart \n")
Expect(spiderpoolControllerPodList.Items).NotTo(HaveLen(0), "failed to get spiderpool controller podList \n")
Expand Down Expand Up @@ -710,7 +710,7 @@ var _ = Describe("test ip with reclaim ip case", Label("reclaim"), func() {
}
}
}
Expect(frame.DeletePodList(deletePodList)).NotTo(HaveOccurred(), client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))})
Expect(frame.DeletePodList(deletePodList, &client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))})).NotTo(HaveOccurred())

commandStr = "systemctl start kubelet"
output, err = frame.DockerExecCommand(ctx, workerNodeName, commandStr)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/spidercoordinator/spidercoordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ var _ = Describe("SpiderCoordinator", Label("spidercoordinator", "overlay"), Ser
Expect(err).NotTo(HaveOccurred())

if len(podList.Items) != 0 {
Expect(frame.DeletePodList(podList)).NotTo(HaveOccurred(), client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))})
Expect(frame.DeletePodList(podList, &client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))})).NotTo(HaveOccurred())
}

Eventually(func() bool {
Expand Down Expand Up @@ -603,7 +603,7 @@ var _ = Describe("SpiderCoordinator", Label("spidercoordinator", "overlay"), Ser
})
Expect(err).NotTo(HaveOccurred())
if len(podList.Items) != 0 {
Expect(frame.DeletePodList(podList)).NotTo(HaveOccurred(), client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))})
Expect(frame.DeletePodList(podList, &client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(0))})).NotTo(HaveOccurred())
}

Eventually(func() bool {
Expand Down

0 comments on commit 8d03168

Please sign in to comment.