@@ -38,6 +38,7 @@ import (
3838)
3939
4040func TestXrayAuditNpmJson (t * testing.T ) {
41+ integration .InitAuditJavaScriptTest (t , scangraph .GraphScanMinXrayVersion )
4142 output := testAuditNpm (t , string (format .Json ), false )
4243 validations .VerifyJsonResults (t , output , validations.ValidationParams {
4344 SecurityViolations : 1 ,
@@ -46,6 +47,7 @@ func TestXrayAuditNpmJson(t *testing.T) {
4647}
4748
4849func TestXrayAuditNpmSimpleJson (t * testing.T ) {
50+ integration .InitAuditJavaScriptTest (t , scangraph .GraphScanMinXrayVersion )
4951 output := testAuditNpm (t , string (format .SimpleJson ), true )
5052 validations .VerifySimpleJsonResults (t , output , validations.ValidationParams {
5153 SecurityViolations : 1 ,
@@ -55,7 +57,6 @@ func TestXrayAuditNpmSimpleJson(t *testing.T) {
5557}
5658
5759func testAuditNpm (t * testing.T , format string , withVuln bool ) string {
58- integration .InitAuditJavaScriptTest (t , scangraph .GraphScanMinXrayVersion )
5960 _ , cleanUp := securityTestUtils .CreateTestProjectEnvAndChdir (t , filepath .Join (filepath .FromSlash (securityTests .GetTestResourcesPath ()), "projects" , "package-managers" , "npm" , "npm" ))
6061 defer cleanUp ()
6162 // Run npm install before executing jfrog xr npm-audit
@@ -337,23 +338,24 @@ func testXrayAuditGradle(t *testing.T, format string) string {
337338}
338339
339340func TestXrayAuditMavenJson (t * testing.T ) {
340- output := testXscAuditMaven (t , string (format .Json ))
341+ integration .InitAuditJavaTest (t , scangraph .GraphScanMinXrayVersion )
342+ output := testAuditMaven (t , string (format .Json ))
341343 validations .VerifyJsonResults (t , output , validations.ValidationParams {
342344 Vulnerabilities : 1 ,
343345 Licenses : 1 ,
344346 })
345347}
346348
347349func TestXrayAuditMavenSimpleJson (t * testing.T ) {
348- output := testXscAuditMaven (t , string (format .SimpleJson ))
350+ integration .InitAuditJavaTest (t , scangraph .GraphScanMinXrayVersion )
351+ output := testAuditMaven (t , string (format .SimpleJson ))
349352 validations .VerifySimpleJsonResults (t , output , validations.ValidationParams {
350353 Vulnerabilities : 1 ,
351354 Licenses : 1 ,
352355 })
353356}
354357
355- func testXscAuditMaven (t * testing.T , format string ) string {
356- integration .InitAuditJavaTest (t , scangraph .GraphScanMinXrayVersion )
358+ func testAuditMaven (t * testing.T , format string ) string {
357359 _ , cleanUp := securityTestUtils .CreateTestProjectEnvAndChdir (t , filepath .Join (filepath .FromSlash (securityTests .GetTestResourcesPath ()), "projects" , "package-managers" , "maven" , "maven" ))
358360 defer cleanUp ()
359361 // Add dummy descriptor file to check that we run only specific audit
0 commit comments