Skip to content

Commit

Permalink
fix the order in which resources are cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
chengxiangdong committed Oct 19, 2023
1 parent 9d0d9b6 commit 0980b6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/e2e/dedicated_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ var _ = ginkgo.Describe("dedicated ELB service test with the specified ID", func
if vpcOpts.SubnetID == "" {
return
}
framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name)
if service1 != nil {
framework.RemoveService(kubeClient, service1.Namespace, service1.Name)
framework.WaitServiceDisappearOnCluster(kubeClient, service1.Namespace, service1.Name)
Expand All @@ -137,6 +136,8 @@ var _ = ginkgo.Describe("dedicated ELB service test with the specified ID", func
framework.WaitServiceDisappearOnCluster(kubeClient, service2.Namespace, service2.Name)
}

framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name)

sharedElbClient := wrapper.SharedLoadBalanceClient{AuthOpts: authOpts}
_, err := sharedElbClient.GetInstance(*elbID)
gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/shared_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ var _ = ginkgo.Describe("Use an existing shared load balancer (TCP) service test
if vpcOpts.SubnetID == "" {
return
}
framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name)
if service1 != nil {
framework.RemoveService(kubeClient, service1.Namespace, service1.Name)
framework.WaitServiceDisappearOnCluster(kubeClient, service1.Namespace, service1.Name)
Expand All @@ -218,6 +217,8 @@ var _ = ginkgo.Describe("Use an existing shared load balancer (TCP) service test
framework.WaitServiceDisappearOnCluster(kubeClient, service2.Namespace, service2.Name)
}

framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name)

sharedElbClient := wrapper.SharedLoadBalanceClient{AuthOpts: authOpts}
_, err := sharedElbClient.GetInstance(*elbID)
gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
Expand Down

0 comments on commit 0980b6c

Please sign in to comment.