Skip to content

Commit 3ba8f42

Browse files
committed
Update: podTemplateList name; Fix: initial fetching of PodTemplates
1 parent fe91d5f commit 3ba8f42

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/e2e/common/podtemplates.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ var _ = ginkgo.Describe("[sig-architecture] PodTemplates", func() {
3636
podTemplateName := "nginx-pod-template-" + string(uuid.NewUUID())
3737

3838
// get a list of PodTemplates (in all namespaces to hit endpoint)
39-
podTemplateList, err := f.ClientSet.CoreV1().PodTemplates("").List(metav1.ListOptions{})
39+
podTemplateList, err := f.ClientSet.CoreV1().PodTemplates("").List(metav1.ListOptions{
40+
LabelSelector: "podtemplate-static=true",
41+
})
4042
framework.ExpectNoError(err, "failed to list all PodTemplates")
4143
framework.ExpectEqual(len(podTemplateList.Items), 0, "unable to find templates")
4244

@@ -85,10 +87,10 @@ var _ = ginkgo.Describe("[sig-architecture] PodTemplates", func() {
8587
framework.ExpectNoError(err, "failed to delete PodTemplate")
8688

8789
// list the PodTemplates
88-
podTemplateListWithLabel, err := f.ClientSet.CoreV1().PodTemplates("").List(metav1.ListOptions{
90+
podTemplateList, err = f.ClientSet.CoreV1().PodTemplates("").List(metav1.ListOptions{
8991
LabelSelector: "podtemplate-static=true",
9092
})
9193
framework.ExpectNoError(err, "failed to list PodTemplate")
92-
framework.ExpectEqual(len(podTemplateListWithLabel.Items), 0, "PodTemplate list returned items, failed to delete PodTemplate")
94+
framework.ExpectEqual(len(podTemplateList.Items), 0, "PodTemplate list returned items, failed to delete PodTemplate")
9395
})
9496
})

0 commit comments

Comments
 (0)