Skip to content

Commit 06587dc

Browse files
committed
Improve upload archive progress bar
Signed-off-by: Michael Sverdlov <[email protected]>
1 parent 5b34971 commit 06587dc

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

go_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ func TestSetupGoCommand(t *testing.T) {
390390
if !*tests.TestGo {
391391
t.Skip("Skipping go test. To run go test add the '-test.go=true' option.")
392392
}
393+
_, cleanUpFunc := initGoTest(t)
394+
defer cleanUpFunc()
393395
// Validate that the module does not exist in the cache before running the test.
394396
client, err := httpclient.ClientBuilder().Build()
395397
assert.NoError(t, err)
@@ -408,7 +410,7 @@ func TestSetupGoCommand(t *testing.T) {
408410
// Validate that the module exists in the cache after running the test.
409411
// That means that the setup command worked and the 'go get' resolved the module from Artifactory.
410412
_, res, err := client.GetRemoteFileDetails(moduleCacheUrl, artHttpDetails)
411-
if assert.NoError(t, err) {
413+
if assert.NoError(t, err, "Failed to find the artifact in the cache: "+moduleCacheUrl) {
412414
assert.Equal(t, http.StatusOK, res.StatusCode)
413415
}
414416
}

main_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func createJfrogHomeConfig(t *testing.T, encryptPassword bool) {
131131
assert.NoError(t, err)
132132
}
133133
*tests.JfrogUrl = utils.AddTrailingSlashIfNeeded(*tests.JfrogUrl)
134+
*tests.JfrogUrl = strings.ReplaceAll(*tests.JfrogUrl, "http://", "https://")
134135
err = coreTests.NewJfrogCli(execMain, "jfrog config", credentials).Exec("add", "default", "--interactive=false", "--url="+*tests.JfrogUrl, "--enc-password="+strconv.FormatBool(encryptPassword))
135136
assert.NoError(t, err)
136137
}

maven_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ func TestSetupMavenCommand(t *testing.T) {
401401
// Validate that the artifact exists in the cache after running the test.
402402
// This confirms that the setup command worked and the artifact was resolved from Artifactory.
403403
_, res, err := client.GetRemoteFileDetails(moduleCacheUrl, artHttpDetails)
404-
if assert.NoError(t, err) {
404+
if assert.NoError(t, err, "Failed to find the artifact in the cache: "+moduleCacheUrl) {
405405
assert.Equal(t, http.StatusOK, res.StatusCode)
406406
}
407407
}

npm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ func TestSetupNpmCommand(t *testing.T) {
792792
// Validate that the module exists in the cache after running the test.
793793
// That means that the setup command worked and the 'go get' resolved the module from Artifactory.
794794
_, res, err := client.GetRemoteFileDetails(moduleCacheUrl, artHttpDetails)
795-
if assert.NoError(t, err) {
795+
if assert.NoError(t, err, "Failed to find the artifact in the cache: "+moduleCacheUrl) {
796796
assert.Equal(t, http.StatusOK, res.StatusCode)
797797
}
798798
}

nuget_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func testSetupCommand(t *testing.T, packageManager project.ProjectType) {
327327
// Validate that the package exists in the cache after running the test.
328328
// That means that the setup command worked and the package resolved from Artifactory.
329329
_, res, err := client.GetRemoteFileDetails(moduleCacheUrl, artHttpDetails)
330-
if assert.NoError(t, err) {
330+
if assert.NoError(t, err, "Failed to find the artifact in the cache: "+moduleCacheUrl) {
331331
assert.Equal(t, http.StatusOK, res.StatusCode)
332332
}
333333
}

0 commit comments

Comments
 (0)