File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed
itest/trivy-operator/behavior Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 2222 - LICENSE
2323 - NOTICE
2424env :
25- KIND_VERSION : v0.17 .0
26- KIND_IMAGE : kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
25+ KIND_VERSION : v0.24 .0
26+ KIND_IMAGE : kindest/node:v1.31.2
2727 GO_VERSION : ' 1.22'
2828permissions : {}
2929concurrency :
@@ -120,7 +120,7 @@ jobs:
120120 with :
121121 aqua_version : v1.25.0
122122 - name : Setup Kubernetes cluster (KIND)
123- uses : engineerd/setup-kind@v0.5.0
123+ uses : engineerd/setup-kind@v0.6.2
124124 with :
125125 version : ${{ env.KIND_VERSION }}
126126 image : ${{ env.KIND_IMAGE }}
Original file line number Diff line number Diff line change 22apiVersion : kuttl.dev/v1beta1
33commands :
44 - script : >
5- cnt ="$(kubectl get clustervulnerabilityreports.aquasecurity.github.io clustersbomreport-557764dbc -k8s-cluster \
6- -o=jsonpath='{.report.summary.highCount }')"
7- if [ $cnt -gt 0 ]
5+ name ="$(kubectl get clustervulnerabilityreports.aquasecurity.github.io clustersbomreport-6789697bc -k8s-cluster \
6+ -o=jsonpath='{.metadata.name }')"
7+ if [ $name = "clustersbomreport-6789697bc-k8s-cluster" ]
88
99 then
10- echo "Pass: ClusterVulnerabilityReport highCount ($cnt) is greater than 0 "
10+ echo "Pass: ClusterVulnerabilityReport was created successfully "
1111 else
12- echo "Fail: ClusterVulnerabilityReport highCount ($cnt) should be greater than 0 "
12+ echo "Fail: ClusterVulnerabilityReport name doesn't exist "
1313 exit 1
1414 fi
1515kind : TestAssert
16- timeout : 120
16+ timeout : 240
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
1010 "github.com/aquasecurity/trivy-operator/tests/itest/helper"
1111 appsv1 "k8s.io/api/apps/v1"
1212 batchv1 "k8s.io/api/batch/v1"
13- batchv1beta1 "k8s.io/api/batch/v1beta1"
1413 corev1 "k8s.io/api/core/v1"
1514 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1615 "k8s.io/apimachinery/pkg/util/intstr"
@@ -324,18 +323,18 @@ func ConfigurationCheckerBehavior(inputs *Inputs) func() {
324323 Context ("When CronJob is created" , func () {
325324
326325 var ctx context.Context
327- var cronJob * batchv1beta1 .CronJob
326+ var cronJob * batchv1 .CronJob
328327
329328 BeforeEach (func () {
330329 ctx = context .Background ()
331- cronJob = & batchv1beta1 .CronJob {
330+ cronJob = & batchv1 .CronJob {
332331 ObjectMeta : metav1.ObjectMeta {
333332 Namespace : inputs .PrimaryNamespace ,
334333 Name : "hello-" + rand .String (5 ),
335334 },
336- Spec : batchv1beta1 .CronJobSpec {
335+ Spec : batchv1 .CronJobSpec {
337336 Schedule : "*/1 * * * *" ,
338- JobTemplate : batchv1beta1 .JobTemplateSpec {
337+ JobTemplate : batchv1 .JobTemplateSpec {
339338 Spec : batchv1.JobSpec {
340339 Template : corev1.PodTemplateSpec {
341340 Spec : corev1.PodSpec {
You can’t perform that action at this time.
0 commit comments