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

How to test S3 image uploading on your project? #43

Open
Cleop opened this issue Nov 6, 2018 · 2 comments
Open

How to test S3 image uploading on your project? #43

Cleop opened this issue Nov 6, 2018 · 2 comments
Assignees
Labels
enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! question A question needs to be answered before progress can be made on this issue starter A beginner-friendly issue that is a good starting point for a new person technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@Cleop
Copy link
Member

Cleop commented Nov 6, 2018

How should we test the image uploading functionality on a project?

I can see this nightwatch example on this repo:
https://github.com/dwyl/image-uploads/blob/master/examples/sdk-upload/test/e2e/sdk-upload.test.js

However my concern is that every time you perform this test you are uploading a new file to S3. Unless someone in a team remembers to delete the test files on a regular basis you could end up with a lot of files. This comes as a cost on S3 if it was a large amount of data being stored.

Would it be possible/better to delete the files once they're uploaded? Or can we mock the upload in some way but still test it?

@Cleop Cleop added question A question needs to be answered before progress can be made on this issue help wanted If you can help make progress with this issue, please comment! labels Nov 6, 2018
@nelsonic
Copy link
Member

nelsonic commented Nov 7, 2018

@Cleop this is an great question, thank you for opening the issue! 🥇

At risk of stating the obvious: we need to get creative on testing this while not over-complicating it.
I will add a checklist and draw a diagram of the testing flow. We will write a TDD tutorial for this even if it takes a week, future devs will thank us for years to come.

@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality priority-1 Highest priority issue. This is costing us money every minute that passes. technical A technical issue that requires understanding of the code, infrastructure or dependencies starter A beginner-friendly issue that is a good starting point for a new person labels Nov 7, 2018
@nelsonic
Copy link
Member

@Cleop could the file that gets uploaded to S3 simply be deleted at the end of the test?

@nelsonic nelsonic removed the priority-1 Highest priority issue. This is costing us money every minute that passes. label Jan 18, 2019
@nelsonic nelsonic assigned Cleop and unassigned nelsonic Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! question A question needs to be answered before progress can be made on this issue starter A beginner-friendly issue that is a good starting point for a new person technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

2 participants