Skip to content

Commit

Permalink
Improve upload archive progress bar
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Jan 29, 2025
1 parent 059bd6e commit b2a751f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ require (

replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20250129121249-d5f4218e6901

replace github.com/jfrog/jfrog-cli-artifactory => github.com/sverdlov93/jfrog-cli-artifactory v0.1.5-0.20250129121422-aec4ac831faa
replace github.com/jfrog/jfrog-cli-artifactory => github.com/sverdlov93/jfrog-cli-artifactory v0.1.5-0.20250129132050-7a5a7c64aaa8

replace github.com/jfrog/jfrog-cli-security => github.com/bhanurp/jfrog-cli-security v1.14.1-0.20250129073110-f1baa2f82549

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/sverdlov93/jfrog-cli-artifactory v0.1.5-0.20250129121422-aec4ac831faa h1:haHtjMwyKmYnj2exOBsajEzM9I41UaB6HnKaSLbAACw=
github.com/sverdlov93/jfrog-cli-artifactory v0.1.5-0.20250129121422-aec4ac831faa/go.mod h1:A6diLj00azVxfi+lIgMoHMf8IeN4SoW7n5IW6oeGg5U=
github.com/sverdlov93/jfrog-cli-artifactory v0.1.5-0.20250129132050-7a5a7c64aaa8 h1:W8llpWq0E6/M+IjQfPmCWQgM9gPcUwhl8O/w9ZV7fwo=
github.com/sverdlov93/jfrog-cli-artifactory v0.1.5-0.20250129132050-7a5a7c64aaa8/go.mod h1:A6diLj00azVxfi+lIgMoHMf8IeN4SoW7n5IW6oeGg5U=
github.com/terminalstatic/go-xsd-validate v0.1.5 h1:RqpJnf6HGE2CB/lZB1A8BYguk8uRtcvYAPLCF15qguo=
github.com/terminalstatic/go-xsd-validate v0.1.5/go.mod h1:18lsvYFofBflqCrvo1umpABZ99+GneNTw2kEEc8UPJw=
github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo=
Expand Down
3 changes: 2 additions & 1 deletion go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"github.com/jfrog/jfrog-client-go/http/httpclient"
"github.com/stretchr/testify/require"
"net/http"
"os"
"os/exec"
Expand Down Expand Up @@ -407,7 +408,7 @@ func TestSetupGoCommand(t *testing.T) {
jfrogCli := coretests.NewJfrogCli(execMain, "jfrog", "")
// Please notice that we configure the Go virtual repository (that points to the remote repository),
// because go doesn't support resolving directly from remote repertoires. (https://jfrog.com/help/r/jfrog-artifactory-documentation/set-up-remote-go-repositories)
assert.NoError(t, execGo(jfrogCli, "setup", "go", "--repo="+tests.GoVirtualRepo))
require.NoError(t, execGo(jfrogCli, "setup", "go", "--repo="+tests.GoVirtualRepo))

err = exec.Command("go", "get", "github.com/shirou/gopsutil/v4").Run()
assert.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion maven_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func TestSetupMavenCommand(t *testing.T) {
assert.ErrorContains(t, err, "404")

jfrogCli := coreTests.NewJfrogCli(execMain, "jfrog", "")
assert.NoError(t, execGo(jfrogCli, "setup", "maven", "--repo="+tests.MvnRemoteRepo))
require.NoError(t, execGo(jfrogCli, "setup", "maven", "--repo="+tests.MvnRemoteRepo))

// Remove the artifact from the .m2 cache to force artifactory resolve.
assert.NoError(t, os.RemoveAll(filepath.Join(homeDir, ".m2", "repository", "commons-collections", "commons-collections")))
Expand Down
4 changes: 3 additions & 1 deletion npm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/generic"
"github.com/jfrog/jfrog-cli-core/v2/artifactory/utils"
"github.com/jfrog/jfrog-client-go/http/httpclient"
"github.com/stretchr/testify/require"
"net/http"
"os"
"os/exec"
Expand Down Expand Up @@ -782,7 +783,8 @@ func TestSetupNpmCommand(t *testing.T) {
assert.ErrorContains(t, err, "404")

jfrogCli := coretests.NewJfrogCli(execMain, "jfrog", "")
assert.NoError(t, execGo(jfrogCli, "setup", "npm", "--repo="+tests.NpmRemoteRepo))
require.NoError(t, execGo(jfrogCli, "setup", "npm", "--repo="+tests.NpmRemoteRepo))

// Run 'npm install' to resolve the module from Artifactory and force it to be downloaded from Artifactory.
output, err := exec.Command("npm", "install", "[email protected]", "--cache", t.TempDir(), "--prefix", t.TempDir()).Output()
assert.NoError(t, err, fmt.Sprintf("%s\n%q", string(output), err))
Expand Down
2 changes: 1 addition & 1 deletion nuget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func testSetupCommand(t *testing.T, packageManager project.ProjectType) {
assert.ErrorContains(t, err, "404")

jfrogCli := coreTests.NewJfrogCli(execMain, "jfrog", "")
assert.NoError(t, execGo(jfrogCli, "setup", packageManager.String(), "--repo="+tests.NugetRemoteRepo))
require.NoError(t, execGo(jfrogCli, "setup", packageManager.String(), "--repo="+tests.NugetRemoteRepo))

// Run install some random (Nunit) package to test the setup command.
var output []byte
Expand Down

0 comments on commit b2a751f

Please sign in to comment.