Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Nov 18, 2024
1 parent ccc99ac commit eda0f3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/upload_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *UploadTestSuite) TestUpload() {
assert.Equal(t, client1.ServerName, origin)
assert.NotEmpty(t, mediaId)

raw, err := client2.DoRaw("GET", fmt.Sprintf("/_matrix/media/v3/download/%s/%s", origin, mediaId), nil, "", nil)
raw, err := client2.DoRaw("GET", fmt.Sprintf("/_matrix/client/v1/media/download/%s/%s", origin, mediaId), nil, "", nil)
assert.NoError(t, err)
assert.Equal(t, raw.StatusCode, http.StatusOK)
test_internals.AssertIsTestImage(t, raw.Body)
Expand Down Expand Up @@ -278,7 +278,7 @@ func (s *UploadTestSuite) TestUploadAsyncFlow() {
assert.NotEmpty(t, mediaId)

// Do a test download to ensure that the media doesn't (yet) exist
errRes, err := client2.DoExpectError("GET", fmt.Sprintf("/_matrix/media/v3/download/%s/%s", origin, mediaId), url.Values{
errRes, err := client2.DoExpectError("GET", fmt.Sprintf("/_matrix/client/v1/media/download/%s/%s", origin, mediaId), url.Values{
"timeout_ms": []string{"1000"},
}, "", nil)
assert.NoError(t, err)
Expand All @@ -303,7 +303,7 @@ func (s *UploadTestSuite) TestUploadAsyncFlow() {
assert.Equal(t, http.StatusConflict, errRes.InjectedStatusCode)

// Download and test the upload
raw, err := client2.DoRaw("GET", fmt.Sprintf("/_matrix/media/v3/download/%s/%s", origin, mediaId), nil, "", nil)
raw, err := client2.DoRaw("GET", fmt.Sprintf("/_matrix/client/v1/media/download/%s/%s", origin, mediaId), nil, "", nil)
assert.NoError(t, err)
assert.Equal(t, raw.StatusCode, http.StatusOK)
test_internals.AssertIsTestImage(t, raw.Body)
Expand Down

0 comments on commit eda0f3f

Please sign in to comment.