From 49347065b9515fb48e8b208f4c3af07b4f9dfadf Mon Sep 17 00:00:00 2001 From: Shelley-BaoYue Date: Sat, 24 Sep 2022 19:42:58 +0800 Subject: delete authentication && bugfix ci Signed-off-by: Shelley-BaoYue --- tests/e2e/deployment/deployment_test.go | 72 ++++++++++++++++----------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'tests') diff --git a/tests/e2e/deployment/deployment_test.go b/tests/e2e/deployment/deployment_test.go index 1a8b5ab69..7ee1297a8 100644 --- a/tests/e2e/deployment/deployment_test.go +++ b/tests/e2e/deployment/deployment_test.go @@ -263,46 +263,46 @@ var _ = Describe("Application deployment test in E2E scenario", func() { }) /* - It("Delete statefulSet pod multi times", func() { - replica := int32(2) - // Generate the random string and assign as a UID - UID = "edge-statefulset-" + utils.GetRandomString(5) - - By(fmt.Sprintf("create StatefulSet %s", UID)) - d := utils.NewTestStatefulSet(UID, ctx.Cfg.AppImageURL[1], replica) - ss, err := utils.CreateStatefulSet(clientSet, d) - Expect(err).To(BeNil()) + It("Delete statefulSet pod multi times", func() { + replica := int32(2) + // Generate the random string and assign as a UID + UID = "edge-statefulset-" + utils.GetRandomString(5) + + By(fmt.Sprintf("create StatefulSet %s", UID)) + d := utils.NewTestStatefulSet(UID, ctx.Cfg.AppImageURL[1], replica) + ss, err := utils.CreateStatefulSet(clientSet, d) + Expect(err).To(BeNil()) - utils.WaitForStatusReplicas(clientSet, ss, replica) + utils.WaitForStatusReplicas(clientSet, ss, replica) - By(fmt.Sprintf("get pod for StatefulSet %s", UID)) - labelSelector := labels.SelectorFromSet(map[string]string{"app": UID}) - podList, err := utils.ListPods(clientSet, corev1.NamespaceDefault, labelSelector, nil) - Expect(err).To(BeNil()) - Expect(len(podList.Items)).ShouldNot(Equal(0)) + By(fmt.Sprintf("get pod for StatefulSet %s", UID)) + labelSelector := labels.SelectorFromSet(map[string]string{"app": UID}) + podList, err := utils.ListPods(clientSet, corev1.NamespaceDefault, labelSelector, nil) + Expect(err).To(BeNil()) + Expect(len(podList.Items)).ShouldNot(Equal(0)) - By(fmt.Sprintf("wait for pod of StatefulSet %s running", UID)) - utils.WaitforPodsRunning(ctx.Cfg.KubeConfigPath, *podList, 240*time.Second) + By(fmt.Sprintf("wait for pod of StatefulSet %s running", UID)) + utils.WaitforPodsRunning(ctx.Cfg.KubeConfigPath, *podList, 240*time.Second) - deletePodName := fmt.Sprintf("%s-1", UID) - for i := 0; i < 5; i++ { - By(fmt.Sprintf("delete pod %s", deletePodName)) - err = utils.DeletePod(clientSet, deletePodName, "default") - Expect(err).To(BeNil()) + deletePodName := fmt.Sprintf("%s-1", UID) + for i := 0; i < 5; i++ { + By(fmt.Sprintf("delete pod %s", deletePodName)) + err = utils.DeletePod(clientSet, deletePodName, "default") + Expect(err).To(BeNil()) - By(fmt.Sprintf("wait for pod %s running again", fmt.Sprintf("%s-1", UID))) - err = wait.Poll(5*time.Second, 120*time.Second, func() (bool, error) { - pod, err := clientSet.CoreV1().Pods("default").Get(context.TODO(), deletePodName, metav1.GetOptions{}) - if err != nil { - return false, err - } - if pod.Status.Phase == corev1.PodRunning { - return true, nil - } - return false, nil - }) - Expect(err).To(BeNil()) - } - }*/ + By(fmt.Sprintf("wait for pod %s running again", fmt.Sprintf("%s-1", UID))) + err = wait.Poll(5*time.Second, 120*time.Second, func() (bool, error) { + pod, err := clientSet.CoreV1().Pods("default").Get(context.TODO(), deletePodName, metav1.GetOptions{}) + if err != nil { + return false, err + } + if pod.Status.Phase == corev1.PodRunning { + return true, nil + } + return false, nil + }) + Expect(err).To(BeNil()) + } + }*/ }) }) -- cgit v1.2.3