summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorShelley-BaoYue <baoyue2@huawei.com>2022-09-24 19:42:58 +0800
committerShelley-BaoYue <baoyue2@huawei.com>2022-09-24 20:01:19 +0800
commit49347065b9515fb48e8b208f4c3af07b4f9dfadf (patch)
treea320628045f989aec2c5421d25ac4146274cb957 /tests
parentupdate gomod (diff)
downloadkubeedge-49347065b9515fb48e8b208f4c3af07b4f9dfadf.tar.gz
delete authentication && bugfix ci
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/e2e/deployment/deployment_test.go70
1 files changed, 35 insertions, 35 deletions
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)
+ 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())
+ 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())
+ }
+ }*/
})
})