-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
S3 tests #384
Conversation
The teardown method that cleaned all the files uploaded to s3 doesn't work :/ I will investigate tomorrow night ! |
The open policy has been set, all stored objects are now publicly accessible. |
); | ||
|
||
if ($this->canTestS3) { | ||
register_shutdown_function(function () { |
There was a problem hiding this comment.
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, using
register_shutdown_function` is the only working way that I found to clean the S3 bucket
Everything should work now 👍 But as you said my PR Travis build didn't have access to the S3 env vars |
I'll try out the test by merging your PR! |
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.