@@ -117,11 +117,11 @@ var _ = Describe("ScheduledScan controller", func() {
117117 namespace := "scheduled-scan-triggerd-concurrency-forbid-test"
118118 createNamespace (ctx , namespace )
119119 createScanType (ctx , namespace )
120- createScheduledScan (ctx , namespace , true , 1 * time .Second , executionv1 .ForbidConcurrent )
120+ createScheduledScanWithInterval (ctx , namespace , true , 1 * time .Second , executionv1 .ForbidConcurrent )
121121
122122 var scanlist executionv1.ScanList
123123 // ensure that the ScheduledScan has been triggered
124- waitForScheduledScanToBeTriggered (ctx , namespace )
124+ waitForScheduledScanToBeTriggered (ctx , namespace , timeout )
125125 k8sClient .List (ctx , & scanlist , client .InNamespace (namespace ))
126126
127127 Expect (scanlist .Items ).Should (HaveLen (1 ))
@@ -138,11 +138,11 @@ var _ = Describe("ScheduledScan controller", func() {
138138 namespace := "scheduled-scan-triggerd-concurrency-allow-test"
139139 createNamespace (ctx , namespace )
140140 createScanType (ctx , namespace )
141- createScheduledScan (ctx , namespace , true , 1 * time .Second , executionv1 .AllowConcurrent )
141+ createScheduledScanWithInterval (ctx , namespace , true , 1 * time .Second , executionv1 .AllowConcurrent )
142142
143143 var scanlist executionv1.ScanList
144144 // ensure that the ScheduledScan has been triggered
145- waitForScheduledScanToBeTriggered (ctx , namespace )
145+ waitForScheduledScanToBeTriggered (ctx , namespace , timeout )
146146 k8sClient .List (ctx , & scanlist , client .InNamespace (namespace ))
147147 Expect (scanlist .Items ).ShouldNot (BeEmpty ())
148148
@@ -159,11 +159,11 @@ var _ = Describe("ScheduledScan controller", func() {
159159 namespace := "scheduled-scan-triggerd-concurrency-replace-test"
160160 createNamespace (ctx , namespace )
161161 createScanType (ctx , namespace )
162- createScheduledScan (ctx , namespace , true , 1 * time .Second , executionv1 .ReplaceConcurrent )
162+ createScheduledScanWithInterval (ctx , namespace , true , 1 * time .Second , executionv1 .ReplaceConcurrent )
163163
164164 var scanlist executionv1.ScanList
165165 // ensure that the ScheduledScan has been triggered
166- waitForScheduledScanToBeTriggered (ctx , namespace )
166+ waitForScheduledScanToBeTriggered (ctx , namespace , timeout )
167167 k8sClient .List (ctx , & scanlist , client .InNamespace (namespace ))
168168 Expect (scanlist .Items ).Should (HaveLen (1 ))
169169 firstScanName := scanlist .Items [0 ].Name
0 commit comments