Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

test: Add integration tests for MultipartHTTPSigner #62

Merged
merged 8 commits into from
Sep 30, 2021

Conversation

abyss-w
Copy link
Contributor

@abyss-w abyss-w commented Sep 28, 2021

No description provided.

@Xuanwo
Copy link
Contributor

Xuanwo commented Sep 29, 2021

Can you implement a demo for this test in go-service-s3?

@abyss-w
Copy link
Contributor Author

abyss-w commented Sep 29, 2021

Can you implement a demo for this test in go-service-s3?

I've basically implemented it, but I don't have an account to test it.

@abyss-w abyss-w marked this pull request as ready for review September 29, 2021 09:27
})
}

func TestMultipartHTTPSignerWriteMultipart(t *testing.T, store types.Storager) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could combine these test cases into one method for MultipartHTTPSigner as usually these interfaces are all supported if presign supported?


So(err, ShouldBeNil)

o, err := it.Next()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about recording the MultipartID and passing it as the deferred call's argument so that there's ni need to call List again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not feasible because tests at the same level as list do not run the list test case and end the test, so there is no o.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about use store.Create() to build the o *Object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about use store.Create() to build the o *Object?

If we use store.Create() to build o *Object we still need multipartID.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants