Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What would a test framework for zs3 look like? #38

Open
kat-co opened this issue Jan 23, 2020 · 2 comments
Open

What would a test framework for zs3 look like? #38

kat-co opened this issue Jan 23, 2020 · 2 comments

Comments

@kat-co
Copy link

kat-co commented Jan 23, 2020

Hey @xach, we chatted briefly a few times last year about submitting some code to zs3 to support things like multipart uploads, and DigitalOcean support.

It would be nice to have a set of tests to rely on so I can ensure things aren't breaking. Have you put any thought into this space?

@kat-co
Copy link
Author

kat-co commented Jan 24, 2020

I took a look at the official AWS Go client to see how they are doing testing, and it looks like they've taken the mocking approach.

  • First they piggy-back off of a default config and then populate[1] it with mocked values.
  • The library appears to use a list of Handlers to handle requests at very stages. They clear, the default list and replace it with mocked functions[2].

Since this is the official Go client for all of AWS, they have a lot of resources working on this. I'm trying to consider whether this style of testing would lend itself to zs3, assuming you are open to it.

[1] - https://github.com/aws/aws-sdk-go-v2/blob/9503cfa08dd8766632c983f916d053fef919277d/internal/awstesting/unit/unit.go#L10-L18
[2] - https://github.com/aws/aws-sdk-go-v2/blob/master/service/s3/bucket_location_test.go#L28-L32

@xach
Copy link
Owner

xach commented Jan 27, 2020 via email

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

No branches or pull requests

2 participants