Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix conda
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <michaelsv@jfrog.com>
sverdlov93 committed Jan 15, 2024
1 parent 514f283 commit 0254a59
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion http/httpclient/client.go
Original file line number Diff line number Diff line change
@@ -292,7 +292,7 @@ func (jc *HttpClient) doUploadFile(localPath, url string, httpClientsDetails htt

func (jc *HttpClient) UploadFileFromReader(reader io.Reader, url string, httpClientsDetails httputils.HttpClientDetails,
size int64) (resp *http.Response, body []byte, err error) {
req, err := jc.newRequest("PUT", url, reader)
req, err := jc.newRequest(http.MethodPut, url, reader)
if err != nil {
return
}
6 changes: 3 additions & 3 deletions tests/artifactoryupload_test.go
Original file line number Diff line number Diff line change
@@ -428,8 +428,8 @@ func TestUploadFilesWithFailure(t *testing.T) {

// Check for expected results
assert.Error(t, err)
assert.Equal(t, summary.TotalSucceeded, 1)
assert.Equal(t, summary.TotalFailed, 1)
assert.Equal(t, 1, summary.TotalSucceeded)
assert.Equal(t, 1, summary.TotalFailed)
}

// Creates handlers for TestUploadFilesWithFailure mock server.
@@ -438,7 +438,7 @@ func createUploadFilesWithFailureHandlers() *testutils.HttpServerHandlers {
handlers := testutils.HttpServerHandlers{}
counter := 0
//nolint:unparam
handlers["generic"] = func(w http.ResponseWriter, r *http.Request) {
handlers["/generic/"] = func(w http.ResponseWriter, r *http.Request) {
if counter == 0 {
fmt.Fprintln(w, "{\"checksums\":{\"sha256\":\"123\"}}")
w.WriteHeader(http.StatusOK)

0 comments on commit 0254a59

Please sign in to comment.