@@ -688,6 +688,14 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
688
688
Expect (informerCache .List (context .Background (), listObj , labelOpt , limitOpt )).To (Succeed ())
689
689
Expect (listObj .Items ).Should (HaveLen (1 ))
690
690
})
691
+
692
+ It ("should return an error if the continue list options is set" , func () {
693
+ listObj := & corev1.PodList {}
694
+ continueOpt := client .Continue ("token" )
695
+ By ("verifying that an error is returned" )
696
+ err := informerCache .List (context .Background (), listObj , continueOpt )
697
+ Expect (err ).To (HaveOccurred ())
698
+ })
691
699
})
692
700
693
701
Context ("with unstructured objects" , func () {
@@ -1002,6 +1010,13 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
1002
1010
Expect (nodeList .Items ).NotTo (BeEmpty ())
1003
1011
Expect (len (nodeList .Items )).To (BeEquivalentTo (1 ))
1004
1012
})
1013
+ It ("should return an error if the continue list options is set" , func () {
1014
+ podList := & unstructured.Unstructured {}
1015
+ continueOpt := client .Continue ("token" )
1016
+ By ("verifying that an error is returned" )
1017
+ err := informerCache .List (context .Background (), podList , continueOpt )
1018
+ Expect (err ).To (HaveOccurred ())
1019
+ })
1005
1020
})
1006
1021
Context ("with metadata-only objects" , func () {
1007
1022
It ("should be able to list objects that haven't been watched previously" , func () {
0 commit comments