Fix: try fix CI unit test (#2376)

This commit is contained in:
Jianbo Sun
2021-09-28 18:44:50 +08:00
committed by GitHub
parent 5364e53e50
commit a2ad91f2f5
2 changed files with 6 additions and 2 deletions
@@ -1098,7 +1098,7 @@ var _ = Describe("Test Application Controller", func() {
},
},
"spec": map[string]interface{}{
"clusterIP": "10.0.0.4",
"clusterIP": "10.0.0.64",
"ports": []interface{}{
map[string]interface{}{
"port": 80,
@@ -1154,7 +1154,7 @@ var _ = Describe("Test Application Controller", func() {
{
Type: "ingress",
Healthy: true,
Message: "type: ClusterIP,\t clusterIP:10.0.0.4,\t ports:80,\t domainexample.com",
Message: "type: ClusterIP,\t clusterIP:10.0.0.64,\t ports:80,\t domainexample.com",
},
},
},
+4
View File
@@ -80,6 +80,10 @@ var _ = Describe("ComponentDefinition Normal tests", func() {
}
workDef.SetNamespace(namespace)
Expect(k8sClient.Create(ctx, workDef)).Should(BeNil())
getWd := new(v1beta1.WorkloadDefinition)
Eventually(func() error {
return k8sClient.Get(ctx, client.ObjectKey{Name: workDef.Name, Namespace: namespace}, getWd)
}, 15*time.Second, time.Second).Should(BeNil())
cd := webServiceWithNoTemplate.DeepCopy()
cd.Spec.Workload.Definition = common.WorkloadGVK{}