File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ func TestSmoke_RealCluster(t *testing.T) {
5353 },
5454 "get_deployments_for_cve with known CVE" : {
5555 toolName : "get_deployments_for_cve" ,
56- args : map [string ]any {"cveName" : "CVE-2023-32697 " },
56+ args : map [string ]any {"cveName" : "CVE-2019-11043 " },
5757 validateFunc : func (t * testing.T , result string ) {
5858 t .Helper ()
5959 var data struct {
@@ -64,22 +64,10 @@ func TestSmoke_RealCluster(t *testing.T) {
6464 }
6565 require .NoError (t , json .Unmarshal ([]byte (result ), & data ))
6666
67- // The deployment might not be scanned yet, so we'll be lenient
6867 if len (data .Deployments ) == 0 {
69- t .Log ("Warning: No deployments found with CVE-2023-32697 . Deployment may not be scanned yet." )
68+ t .Log ("Warning: No deployments found with CVE. Deployment may not be scanned yet." )
7069 } else {
71- found := false
72- for _ , dep := range data .Deployments {
73- if dep .Name == "vulnerable-app" && dep .Namespace == "vulnerable-apps" {
74- found = true
75- break
76- }
77- }
78- if found {
79- t .Log ("Successfully found vulnerable-app deployment" )
80- } else {
81- t .Logf ("Found %d deployment(s) with CVE, but not the expected vulnerable-app" , len (data .Deployments ))
82- }
70+ t .Logf ("Found %d deployment(s) with CVE" , len (data .Deployments ))
8371 }
8472 },
8573 },
Original file line number Diff line number Diff line change 2222 spec :
2323 containers :
2424 - name : vulnerable-app
25- image : quay.io/rhacs-eng/qa:sqlite-jdbc-CVE-2023-32697
25+ image : nginx:1.14
2626 ports :
27- - containerPort : 8080
27+ - containerPort : 80
2828 resources :
2929 requests :
3030 cpu : " 0"
You can’t perform that action at this time.
0 commit comments