Replace S3 with MinIO in development environment
Ref: #959
This will help run Gumroad locally and upload/download files without AWS S3 credentials.
Update: will resume the work on this after getting the tests run without sensitive credentials.
Merged tests without creds branch and updated this branch with them
can i address the failing tests ?
Def!
Hi @ershad , I see multiple specs failing due to presigned_url not being present for minio mocked AWS S3 objects. Since there is minio_presigned_url method in SignedUrlHelper module, I am thinking whether this can be used like in below PR to fix most of these specs - https://github.com/antiwork/gumroad/pull/1966 ?
I am thinking around idea that we can use minio deterministic url for local development returned by stub and not recreate internal S3 mocks. wdyt?
Edit: Created another approach to use the same public_url as as presigned_url for local only as per PR - https://github.com/antiwork/gumroad/pull/1985 as the s3 double does not have that so we can mock that value to public url for local only specs.
Think I'm up to speed here now; basically
- We already use MinIO in test, but a bunch of URL generation is actually wrong because we still assume we're using S3+CloudFront
- Part of this PR is fixing the URL generation to work properly, and that breaks a bunch of specs which are testing CloudFront URL formats (possibly some other things too, I haven't looked through all the failures yet)
Will review the related PRs and start fixing remaining specs tomorrow