Creates an S3Resource mongoose model which in the future can be referenced by other database entires for images, sermons, etc.
S3Resource.Upload and deleting the database object wrap aws-sdk to handle uploading and removing the file from S3.
Adds testing setup to connect to the Mongo database before tests are run and disconnect after.
Adds a test to ensure that upload works, the data is exactly as expected, and removal works
Adds itPrivate and describePrivate in test/env.js. These are conditionally it.skip and it depending on the testing environment. This is important because for pull requests (which anyone can submit) we clobber our secret environment variables with dummy variables so a random stranger doesn't steal our keys. In these situations, tests which use important secret keys simply won't work. itPrivate and describePrivate will allow us to run those tests only on code that a maintainer has reviewed and approved.
Some baby steps toward S3 integration.
S3Resource
mongoose model which in the future can be referenced by other database entires for images, sermons, etc.S3Resource.Upload
and deleting the database object wrapaws-sdk
to handle uploading and removing the file from S3.itPrivate
anddescribePrivate
intest/env.js
. These are conditionallyit.skip
andit
depending on the testing environment. This is important because for pull requests (which anyone can submit) we clobber our secret environment variables with dummy variables so a random stranger doesn't steal our keys. In these situations, tests which use important secret keys simply won't work.itPrivate
anddescribePrivate
will allow us to run those tests only on code that a maintainer has reviewed and approved.