From 91f9a1980d56359ba813eb9cf479e316c31ba95d Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Mon, 6 Jan 2025 18:27:16 +0200 Subject: [PATCH] Improve upload archive progress bar Signed-off-by: Michael Sverdlov --- artifactory/commands/dotnet/dotnetcommand_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artifactory/commands/dotnet/dotnetcommand_test.go b/artifactory/commands/dotnet/dotnetcommand_test.go index 32f3117ed..2651af90f 100644 --- a/artifactory/commands/dotnet/dotnetcommand_test.go +++ b/artifactory/commands/dotnet/dotnetcommand_test.go @@ -1,6 +1,7 @@ package dotnet import ( + "github.com/jfrog/jfrog-cli-core/v2/utils/ioutils" "os" "path/filepath" "reflect" @@ -267,7 +268,7 @@ func TestGetConfigPathFromEnvIfProvided(t *testing.T) { defer restoreEnvNuGet() } result := GetConfigPathFromEnvIfProvided(testCase.cmdType) - assert.Equal(t, testCase.expectedPath, result) + assert.Equal(t, testCase.expectedPath, ioutils.WinToUnixPathSeparator(result)) }) } } @@ -297,8 +298,7 @@ func TestCreateConfigFileIfNeeded(t *testing.T) { configPath := filepath.Join(t.TempDir(), tt.configPath) if tt.fileExists { assert.NoError(t, os.MkdirAll(filepath.Dir(configPath), 0777)) - _, err := os.Create(configPath) - assert.NoError(t, err) + assert.NoError(t, os.WriteFile(configPath, []byte{}, 0644)) } err := CreateConfigFileIfNeeded(configPath) assert.NoError(t, err)