Skip to content

Commit

Permalink
e2e change to stateful set
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <[email protected]>
  • Loading branch information
cnvergence committed Dec 12, 2024
1 parent 596a162 commit 1abab42
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/e2e/kube-ovn/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,15 +529,14 @@ var _ = framework.Describe("[group:ipam]", func() {
ippoolClient.CreateSync(ippool1)
ippoolClient.CreateSync(ippool2)

ginkgo.By("Creating deployment " + testDeployName + " without IPPool annotation")
ginkgo.By("Creating statefulset " + testDeployName + " with logical switch annotation and no ippool annotation")
labels := map[string]string{"app": testDeployName}
annotations := map[string]string{util.LogicalSwitchAnnotation: subnetName}
deploy := framework.MakeDeployment(testDeployName, int32(replicas), labels, annotations, "pause", framework.PauseImage, "")
deployClient.CreateSync(deploy)
sts := framework.MakeStatefulSet(testDeployName, testDeployName, int32(replicas), labels, framework.PauseImage)
sts.Spec.Template.Annotations = map[string]string{util.LogicalSwitchAnnotation: subnetName}
sts = stsClient.CreateSync(sts)

ginkgo.By("Getting pods for deployment " + testDeployName)
pods, err := deployClient.GetPods(deploy)
framework.ExpectNoError(err, "failed to get pods for deployment "+testDeployName)
ginkgo.By("Getting pods for statefulset " + testDeployName)
pods := stsClient.GetPods(sts)
framework.ExpectHaveLen(pods.Items, replicas)

for _, pod := range pods.Items {
Expand Down

0 comments on commit 1abab42

Please sign in to comment.