Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
tests2 "github.com/jfrog/jfrog-cli-artifactory/utils/tests"
"os"
"os/exec"
"path"
Expand All @@ -27,7 +28,6 @@ import (
coreTests "github.com/jfrog/jfrog-cli-core/v2/utils/tests"
"github.com/jfrog/jfrog-cli/inttestutils"
"github.com/jfrog/jfrog-cli/utils/tests"
commonTests "github.com/jfrog/jfrog-cli/utils/tests"
"github.com/jfrog/jfrog-client-go/auth"
clientUtils "github.com/jfrog/jfrog-client-go/utils"
"github.com/jfrog/jfrog-client-go/utils/io/fileutils"
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestContainerPushWithDetailedSummary(t *testing.T) {
func() {
imageTag, err := inttestutils.BuildTestImage(imageName+":1", "", repo, containerManager)
assert.NoError(t, err)
defer commonTests.DeleteTestImage(t, imageTag, containerManager)
defer tests2.DeleteTestImage(t, imageTag, containerManager)
// Testing detailed summary without build-info
pushCommand := coreContainer.NewPushCommand(containerManager)
pushCommand.SetThreads(1).SetDetailedSummary(true).SetCmdParams([]string{"push", imageTag}).SetBuildConfiguration(new(build.BuildConfiguration)).SetRepo(tests.DockerLocalRepo).SetServerDetails(serverDetails).SetImageTag(imageTag)
Expand Down Expand Up @@ -165,7 +165,7 @@ func TestContainerPushWithMultipleSlash(t *testing.T) {
func runPushTest(containerManager container.ContainerManagerType, imageName, module string, withModule bool, t *testing.T, repo string) {
imageTag, err := inttestutils.BuildTestImage(imageName+":1", "", repo, containerManager)
assert.NoError(t, err)
defer commonTests.DeleteTestImage(t, imageTag, containerManager)
defer tests2.DeleteTestImage(t, imageTag, containerManager)
buildNumber := "1"

if withModule {
Expand Down Expand Up @@ -369,7 +369,7 @@ func TestContainerPushBuildNameNumberFromEnv(t *testing.T) {
func() {
imageTag, err := inttestutils.BuildTestImage(tests.DockerImageName+":1", "", tests.DockerLocalRepo, containerManager)
assert.NoError(t, err)
defer commonTests.DeleteTestImage(t, imageTag, containerManager)
defer tests2.DeleteTestImage(t, imageTag, containerManager)
buildNumber := "1"
setEnvCallBack := clientTestUtils.SetEnvWithCallbackAndAssert(t, coreutils.BuildName, tests.DockerBuildName)
defer setEnvCallBack()
Expand All @@ -392,7 +392,7 @@ func TestContainerPull(t *testing.T) {
func() {
imageName, err := inttestutils.BuildTestImage(tests.DockerImageName+":1", "", tests.DockerLocalRepo, containerManager)
assert.NoError(t, err)
defer commonTests.DeleteTestImage(t, imageName, containerManager)
defer tests2.DeleteTestImage(t, imageName, containerManager)
for _, repo := range []string{tests.DockerVirtualRepo, tests.DockerLocalRepo} {

// Push container image
Expand Down Expand Up @@ -432,7 +432,7 @@ func TestContainerFatManifestPull(t *testing.T) {
func() {
// Pull container image
imageTag := path.Join(*tests.ContainerRegistry, dockerRepo, imageName+":2.2")
defer commonTests.DeleteTestImage(t, imageTag, containerManager)
defer tests2.DeleteTestImage(t, imageTag, containerManager)
runCmdWithRetries(t, jfrogRtCliTask(containerManager.String()+"-pull", imageTag, dockerRepo, "--build-name="+tests.DockerBuildName, "--build-number="+buildNumber))
runRt(t, "build-publish", tests.DockerBuildName, buildNumber)

Expand Down Expand Up @@ -461,7 +461,7 @@ func TestDockerPromote(t *testing.T) {
// Build and push image
imageName, err := inttestutils.BuildTestImage(tests.DockerImageName+":1", "", tests.DockerLocalRepo, container.DockerClient)
assert.NoError(t, err)
defer commonTests.DeleteTestImage(t, imageName, container.DockerClient)
defer tests2.DeleteTestImage(t, imageName, container.DockerClient)

// Push image
runCmdWithRetries(t, jfrogRtCliTask("docker-push", imageName, tests.DockerLocalRepo))
Expand Down Expand Up @@ -596,13 +596,13 @@ func TestNativeDockerPushPull(t *testing.T) {
runRt(t, "build-publish", tests.DockerBuildName, pushBuildNumber)
imagePath := path.Join(tests.DockerLocalRepo, tests.DockerImageName, pushBuildNumber) + "/"
validateContainerBuild(tests.DockerBuildName, pushBuildNumber, imagePath, module, 7, 5, 7, t)
commonTests.DeleteTestImage(t, image, container.DockerClient)
tests2.DeleteTestImage(t, image, container.DockerClient)

runCmdWithRetries(t, jfCliTask("docker", "-D", "pull", image, "--build-name="+tests.DockerBuildName, "--build-number="+pullBuildNumber, "--module="+module))
runRt(t, "build-publish", tests.DockerBuildName, pullBuildNumber)
imagePath = path.Join(tests.DockerLocalRepo, tests.DockerImageName, pullBuildNumber) + "/"
validateContainerBuild(tests.DockerBuildName, pullBuildNumber, imagePath, module, 0, 7, 0, t)
commonTests.DeleteTestImage(t, image, container.DockerClient)
tests2.DeleteTestImage(t, image, container.DockerClient)

inttestutils.ContainerTestCleanup(t, serverDetails, artHttpDetails, tests.DockerImageName, tests.DockerBuildName, tests.DockerLocalRepo)
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/jfrog/build-info-go v1.12.0
github.com/jfrog/gofrog v1.7.6
github.com/jfrog/jfrog-cli-application v1.0.1
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20251015052652-84ea3afaf439
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20251017072454-f83a03ee98d6
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251015045218-1a38c9e47097
github.com/jfrog/jfrog-cli-platform-services v1.10.0
github.com/jfrog/jfrog-cli-security v1.21.8
Expand Down Expand Up @@ -250,7 +250,7 @@ require (

//replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20251006061821-8b1be6a65215

//replace github.com/jfrog/jfrog-cli-artifactory => github.com/fluxxBot/jfrog-cli-artifactory v0.0.0-20251008152604-32538b00579c
//replace github.com/jfrog/jfrog-cli-artifactory => github.com/fluxxBot/jfrog-cli-artifactory v0.0.0-20251017061455-6a03988302bf

//replace github.com/jfrog/jfrog-cli-core/v2 => github.com/fluxxBot/jfrog-cli-core/v2 v2.58.1-0.20251008152439-da488ef26725

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-application v1.0.1 h1:PiiSVKFFs8VLAwjCe2JrIKlX7LmARFt+r8BLTupWIDc=
github.com/jfrog/jfrog-cli-application v1.0.1/go.mod h1:gjV6Q2hhoMe3FF77GFiTyIRLSHokpDrkVj0GvYM+1Y4=
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20251015052652-84ea3afaf439 h1:3B3JGujNYFpHQ69pjaPpRf0Ugny0UCU35whkcmGqaHc=
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20251015052652-84ea3afaf439/go.mod h1:nT050Wb18tTlfcQHefyMENzFOz9Vdym6WP0Z3Nc2qHc=
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20251017072454-f83a03ee98d6 h1:k+L1EByW0oAjbl2GzBKpPjQ/V9HV/22WfXqR+opegnk=
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20251017072454-f83a03ee98d6/go.mod h1:nT050Wb18tTlfcQHefyMENzFOz9Vdym6WP0Z3Nc2qHc=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251015045218-1a38c9e47097 h1:+W6BPxJ0nPtlQ6l6nmypW1eEANoVPiN8HDR4kQJA8uI=
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20251015045218-1a38c9e47097/go.mod h1:UOeOwEEmRIi57cRwghN5OBVoqkJieYQQfLpeqw8Yv38=
github.com/jfrog/jfrog-cli-platform-services v1.10.0 h1:O+N/VAF+QjFvq9xkHpmzKLcdl9aJu3IP204Su0L14rw=
Expand Down
4 changes: 2 additions & 2 deletions inttestutils/docker.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package inttestutils

import (
tests2 "github.com/jfrog/jfrog-cli-artifactory/utils/tests"
"path"
"path/filepath"
"strings"
Expand All @@ -14,7 +15,6 @@ import (
"github.com/jfrog/jfrog-cli-core/v2/artifactory/utils"
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
"github.com/jfrog/jfrog-cli/utils/tests"
commonTests "github.com/jfrog/jfrog-cli/utils/tests"
"github.com/jfrog/jfrog-client-go/utils/io/httputils"
"github.com/jfrog/jfrog-client-go/utils/log"
"github.com/stretchr/testify/assert"
Expand All @@ -24,7 +24,7 @@ func BuildTestImage(imageName, dockerfileName, repo string, containerManagerType
log.Info("Building image", imageName, "with", containerManagerType.String())
imageName = path.Join(*tests.ContainerRegistry, repo, imageName)
dockerFilePath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "docker")
imageBuilder := commonTests.NewBuildDockerImage(imageName, dockerFilePath, containerManagerType).SetDockerFileName(dockerfileName)
imageBuilder := tests2.NewBuildDockerImage(imageName, dockerFilePath, containerManagerType).SetDockerFileName(dockerfileName)
return imageName, gofrogcmd.RunCmd(imageBuilder)
}

Expand Down
192 changes: 0 additions & 192 deletions utils/tests/docker.go

This file was deleted.

Loading