mirror of
https://github.com/versity/versitygw.git
synced 2026-01-08 12:41:10 +00:00
Command-Line Tests
Instructions - Running Locally
- Build the
versitygwbinary. - Install the aws command-line interface if unavailable on your machine. Instructions are here.
- Install BATS. Instructions are here.
- Create a
.secretsfile in thetestsfolder, and add theAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYvalues to the file. - Create a local AWS profile for connection to S3, and add the
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, andAWS_REGIONvalues for your account to the profile. Example:
export AWS_PROFILE=versity-test
export AWS_ACCESS_KEY_ID=<your account ID>
export AWS_SECRET_ACCESS_KEY=<your account key>
export AWS_REGION=<your account region>
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile $AWS_PROFILE
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile $AWS_PROFILE
aws configure set aws_region $AWS_REGION --profile $AWS_PROFILE
- Create an environment file (
.env) similar to the ones in this folder, setting theAWS_PROFILEparameter to the name of the profile you created. - In the root repo folder, run with
VERSITYGW_TEST_ENV=<env file> tests/run_all.sh.
Instructions - Running With Docker
- Create a
.secretsfile in thetestsfolder, and add theAWS_PROFILE,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, and theAWS_PROFILEfields. - Build and run the
Dockerfile_test_batsfile.