@@ -36,7 +36,9 @@ var _ = ginkgo.Describe("[sig-architecture] PodTemplates", func() {
36
36
podTemplateName := "nginx-pod-template-" + string (uuid .NewUUID ())
37
37
38
38
// 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
+ })
40
42
framework .ExpectNoError (err , "failed to list all PodTemplates" )
41
43
framework .ExpectEqual (len (podTemplateList .Items ), 0 , "unable to find templates" )
42
44
@@ -85,10 +87,10 @@ var _ = ginkgo.Describe("[sig-architecture] PodTemplates", func() {
85
87
framework .ExpectNoError (err , "failed to delete PodTemplate" )
86
88
87
89
// list the PodTemplates
88
- podTemplateListWithLabel , err : = f .ClientSet .CoreV1 ().PodTemplates ("" ).List (metav1.ListOptions {
90
+ podTemplateList , err = f .ClientSet .CoreV1 ().PodTemplates ("" ).List (metav1.ListOptions {
89
91
LabelSelector : "podtemplate-static=true" ,
90
92
})
91
93
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" )
93
95
})
94
96
})
0 commit comments