Skip to content

Commit e8cc9f8

Browse files
committed
Improve repositores code
Signed-off-by: Michael Sverdlov <michaelsv@jfrog.com>
1 parent c3e0486 commit e8cc9f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

artifactory/commands/buildtoollogin/buildtoollogin_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ func testBuildToolLoginCommandPip(t *testing.T, buildTool project.ProjectType) {
175175

176176
for _, testCase := range testCases {
177177
t.Run(testCase.name, func(t *testing.T) {
178-
// Clean up the temporary pip config file.
179-
assert.NoError(t, os.Remove(pipConfFilePath))
180-
181178
// Set up server details for the current test case's authentication type.
182179
pipLoginCmd.serverDetails.SetUser(testCase.user)
183180
pipLoginCmd.serverDetails.SetPassword(testCase.password)
@@ -204,6 +201,9 @@ func testBuildToolLoginCommandPip(t *testing.T, buildTool project.ProjectType) {
204201
// Validate anonymous access.
205202
assert.Contains(t, pipConfigContent, "index-url = https://acme.jfrog.io/artifactory/api/pypi/test-repo/simple")
206203
}
204+
205+
// Clean up the temporary pip config file.
206+
assert.NoError(t, os.Remove(pipConfFilePath))
207207
})
208208
}
209209
}

0 commit comments

Comments
 (0)