@@ -3,6 +3,8 @@ package main
33import (
44 "encoding/json"
55 "fmt"
6+ "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/ocicontainer"
7+ "github.com/jfrog/jfrog-cli-artifactory/utils/tests"
68 "net/http"
79 "net/http/httptest"
810 "path"
@@ -24,7 +26,6 @@ import (
2426 "github.com/jfrog/jfrog-cli-security/utils/jasutils"
2527
2628 "github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/container"
27- containerUtils "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils/container"
2829
2930 "github.com/jfrog/jfrog-cli-core/v2/common/build"
3031 commonCommands "github.com/jfrog/jfrog-cli-core/v2/common/commands"
@@ -272,12 +273,12 @@ func TestDockerScan(t *testing.T) {
272273func runDockerScan (t * testing.T , testCli * coreTests.JfrogCli , imageName , watchName string , minViolations , minVulnerabilities , minLicenses int , minInactives int , validateSecrets bool ) {
273274 // Pull image from docker repo
274275 imageTag := path .Join (* securityTests .ContainerRegistry , securityTests .DockerVirtualRepo , imageName )
275- dockerPullCommand := container .NewPullCommand (containerUtils .DockerClient )
276+ dockerPullCommand := container .NewPullCommand (ocicontainer .DockerClient )
276277 dockerPullCommand .SetCmdParams ([]string {"pull" , imageTag }).SetImageTag (imageTag ).SetRepo (securityTests .DockerVirtualRepo ).SetServerDetails (securityTests .XrDetails ).SetBuildConfiguration (new (build.BuildConfiguration ))
277278 if ! assert .NoError (t , dockerPullCommand .Run ()) {
278279 return
279280 }
280- defer commonTests .DeleteTestImage (t , imageTag , containerUtils .DockerClient )
281+ defer tests .DeleteTestImage (t , imageTag , ocicontainer .DockerClient )
281282 // Run docker scan on image
282283 cmdArgs := []string {"docker" , "scan" , imageTag , "--server-id=default" , "--licenses" , "--fail=false" , "--min-severity=low" , "--fixable-only" }
283284 if validateSecrets {
@@ -318,10 +319,10 @@ func TestAdvancedSecurityDockerScan(t *testing.T) {
318319func runAdvancedSecurityDockerScan (t * testing.T , testCli * coreTests.JfrogCli , imageName string ) {
319320 // Pull image from docker repo
320321 imageTag := path .Join (* securityTests .ContainerRegistry , securityTests .DockerVirtualRepo , imageName )
321- dockerPullCommand := container .NewPullCommand (containerUtils .DockerClient )
322+ dockerPullCommand := container .NewPullCommand (ocicontainer .DockerClient )
322323 dockerPullCommand .SetCmdParams ([]string {"pull" , imageTag }).SetImageTag (imageTag ).SetRepo (securityTests .DockerVirtualRepo ).SetServerDetails (securityTests .XrDetails ).SetBuildConfiguration (new (build.BuildConfiguration ))
323324 if assert .NoError (t , dockerPullCommand .Run ()) {
324- defer commonTests .DeleteTestImage (t , imageTag , containerUtils .DockerClient )
325+ defer tests .DeleteTestImage (t , imageTag , ocicontainer .DockerClient )
325326 args := []string {"docker" , "scan" , imageTag , "--server-id=default" , "--format=simple-json" , "--fail=false" , "--min-severity=low" , "--fixable-only" }
326327
327328 // Run docker scan on image
0 commit comments