From e8cc9f845deb9465f5684b54bcc478dbbb3eedb3 Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Wed, 6 Nov 2024 12:12:48 +0200 Subject: [PATCH] Improve repositores code Signed-off-by: Michael Sverdlov --- artifactory/commands/buildtoollogin/buildtoollogin_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artifactory/commands/buildtoollogin/buildtoollogin_test.go b/artifactory/commands/buildtoollogin/buildtoollogin_test.go index def625de2..19149ded7 100644 --- a/artifactory/commands/buildtoollogin/buildtoollogin_test.go +++ b/artifactory/commands/buildtoollogin/buildtoollogin_test.go @@ -175,9 +175,6 @@ func testBuildToolLoginCommandPip(t *testing.T, buildTool project.ProjectType) { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { - // Clean up the temporary pip config file. - assert.NoError(t, os.Remove(pipConfFilePath)) - // Set up server details for the current test case's authentication type. pipLoginCmd.serverDetails.SetUser(testCase.user) pipLoginCmd.serverDetails.SetPassword(testCase.password) @@ -204,6 +201,9 @@ func testBuildToolLoginCommandPip(t *testing.T, buildTool project.ProjectType) { // Validate anonymous access. assert.Contains(t, pipConfigContent, "index-url = https://acme.jfrog.io/artifactory/api/pypi/test-repo/simple") } + + // Clean up the temporary pip config file. + assert.NoError(t, os.Remove(pipConfFilePath)) }) } }