mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 18:10:21 +00:00
fix flaky e2e test (#1791)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
This commit is contained in:
@@ -77,7 +77,9 @@ var _ = Describe("Application Normal tests", func() {
|
||||
var newApp v1beta1.Application
|
||||
Expect(common.ReadYamlToObject("testdata/app/"+source, &newApp)).Should(BeNil())
|
||||
newApp.Namespace = namespaceName
|
||||
Expect(k8sClient.Create(ctx, &newApp)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, newApp.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Get Application latest status")
|
||||
Eventually(
|
||||
|
||||
@@ -196,7 +196,9 @@ var _ = Describe("Test application of the specified definition version", func()
|
||||
}
|
||||
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &app)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, app.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(deployment) is created successfully")
|
||||
webServiceDeploy := &appsv1.Deployment{}
|
||||
@@ -408,7 +410,9 @@ var _ = Describe("Test application of the specified definition version", func()
|
||||
}
|
||||
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &app)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, app.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(deployment) is created successfully by Helm")
|
||||
deploy := &appsv1.Deployment{}
|
||||
@@ -563,7 +567,9 @@ var _ = Describe("Test application of the specified definition version", func()
|
||||
}
|
||||
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &app)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, app.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(job) is created successfully")
|
||||
job := &batchv1.Job{}
|
||||
|
||||
@@ -167,7 +167,9 @@ var _ = Describe("Test application containing helm module", func() {
|
||||
},
|
||||
}
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &app)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, app.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(deployment) is created successfully by Helm")
|
||||
deploy := &appsv1.Deployment{}
|
||||
@@ -301,7 +303,9 @@ var _ = Describe("Test application containing helm module", func() {
|
||||
},
|
||||
}
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &appTest)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, appTest.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(deployment) is created successfully by Helm")
|
||||
deploy := &appsv1.Deployment{}
|
||||
@@ -353,7 +357,9 @@ var _ = Describe("Test application containing helm module", func() {
|
||||
},
|
||||
}
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &newApp)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, newApp.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(deployment) is created successfully by Helm")
|
||||
deploy := &appsv1.Deployment{}
|
||||
@@ -375,6 +381,6 @@ var _ = Describe("Test application containing helm module", func() {
|
||||
return errors.New("json schema is not found in the ConfigMap")
|
||||
}
|
||||
return nil
|
||||
}, 60*time.Second, 5*time.Second).Should(Succeed())
|
||||
}, 60*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
})
|
||||
})
|
||||
|
||||
@@ -197,7 +197,9 @@ spec:
|
||||
},
|
||||
}
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &app)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, app.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(deployment) is created successfully")
|
||||
deploy := &appsv1.Deployment{}
|
||||
@@ -325,7 +327,9 @@ spec:
|
||||
},
|
||||
}
|
||||
By("Create application")
|
||||
Expect(k8sClient.Create(ctx, &appTest)).Should(Succeed())
|
||||
Eventually(func() error {
|
||||
return k8sClient.Create(ctx, appTest.DeepCopy())
|
||||
}, 10*time.Second, 500*time.Millisecond).Should(Succeed())
|
||||
|
||||
By("Verify the workload(deployment) is created successfully")
|
||||
deploy := &appsv1.Deployment{}
|
||||
|
||||
Reference in New Issue
Block a user