Skip to content

Commit

Permalink
fix subnet e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Jul 28, 2021
1 parent 4818a83 commit dc56d23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/subnet/normal.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ var _ = Describe("[Subnet]", func() {
By("validate subnet")
err = f.WaitSubnetReady(name)
Expect(err).NotTo(HaveOccurred())
time.Sleep(5 * time.Second)

subnet, err = f.OvnClientSet.KubeovnV1().Subnets().Get(context.Background(), name, metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -372,6 +371,7 @@ var _ = Describe("[Subnet]", func() {
By("delete subnet")
err = f.OvnClientSet.KubeovnV1().Subnets().Delete(context.Background(), name, metav1.DeleteOptions{})
Expect(err).NotTo(HaveOccurred())
time.Sleep(5 * time.Second)

for _, pod := range ovsPods.Items {
if nodeIPs[pod.Status.HostIP] == "" {
Expand Down Expand Up @@ -462,14 +462,14 @@ var _ = Describe("[Subnet]", func() {
By("validate subnet")
err = f.WaitSubnetReady(name)
Expect(err).NotTo(HaveOccurred())
time.Sleep(5 * time.Second)

subnet, err := f.OvnClientSet.KubeovnV1().Subnets().Get(context.Background(), name, metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred())
Expect(subnet.Spec.GatewayType).To(Equal(kubeovn.GWDistributedType))
Expect(subnet.Spec.ExternalEgressGateway).To(Equal(egw))
Expect(subnet.Spec.PolicyRoutingPriority).To(Equal(priority))
Expect(subnet.Spec.PolicyRoutingTableID).To(Equal(tableID))
time.Sleep(5 * time.Second)

pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -565,6 +565,7 @@ var _ = Describe("[Subnet]", func() {
By("delete subnet")
err = f.OvnClientSet.KubeovnV1().Subnets().Delete(context.Background(), name, metav1.DeleteOptions{})
Expect(err).NotTo(HaveOccurred())
time.Sleep(5 * time.Second)

for _, ovsPod := range ovsPods.Items {
if ovsPod.Status.HostIP != selectedNode.Status.Addresses[0].Address {
Expand Down

0 comments on commit dc56d23

Please sign in to comment.