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

S3 tests #384

Merged
merged 10 commits into from
Oct 24, 2016
Merged

S3 tests #384

merged 10 commits into from
Oct 24, 2016

Conversation

nicolasbeauvais
Copy link
Contributor

As discussed in #381

I tough it would be a good thing to test the file integrity in https://github.com/spatie/laravel-medialibrary/compare/master...nicolasbeauvais:s3-tests?expand=1#diff-bae027168159c1221823e2acf336b0b0R93

but the s3 bucket needs an open policy so that Travis-ci can read the file with file_get_content() so it's commented for now.

@nicolasbeauvais
Copy link
Contributor Author

The teardown method that cleaned all the files uploaded to s3 doesn't work :/ I will investigate tomorrow night !

@freekmurze
Copy link
Member

The open policy has been set, all stored objects are now publicly accessible.

);

if ($this->canTestS3) {
register_shutdown_function(function () {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couldn't find a way to call Storage:: or app('filesystem.disk') in a ̀tearDownAfterCLassmethod, usingregister_shutdown_function` is the only working way that I found to clean the S3 bucket

@nicolasbeauvais
Copy link
Contributor Author

Everything should work now 👍 But as you said my PR Travis build didn't have access to the S3 env vars

@freekmurze freekmurze merged commit ef7fbc3 into spatie:master Oct 24, 2016
@freekmurze
Copy link
Member

I'll try out the test by merging your PR!

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

Successfully merging this pull request may close these issues.

2 participants