Skip to content

Test cmdline upload part copy #64

Test cmdline upload part copy

Test cmdline upload part copy #64

Workflow file for this run

name: system tests
on: pull_request
jobs:
build:
name: RunTests
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Install ShellCheck
run: sudo apt-get install shellcheck
- name: Run ShellCheck
run: shellcheck -S warning ./tests/*.sh
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
id: go
- name: Get Dependencies
run: |
go get -v -t -d ./...
- name: Install BATS
run: |
git clone https://github.com/bats-core/bats-core.git
cd bats-core && ./install.sh $HOME
- name: Build
run: |
make testbin
export AWS_ACCESS_KEY_ID=user
export AWS_SECRET_ACCESS_KEY=pass
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile versity
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile versity
mkdir /tmp/gw
- name: Run tests
run: |
export AWS_ACCESS_KEY_ID=user
export AWS_SECRET_ACCESS_KEY=pass
VERSITYGW_TEST_ENV=$GITHUB_WORKSPACE/tests/.env.default $HOME/bin/bats ./tests/s3_bucket_tests.sh
VERSITYGW_TEST_ENV=$GITHUB_WORKSPACE/tests/.env.default $HOME/bin/bats ./tests/posix_tests.sh
- name: Run tests with static buckets
run: |
export AWS_ACCESS_KEY_ID=user
export AWS_SECRET_ACCESS_KEY=pass
export VERSITYGW_TEST_ENV=$GITHUB_WORKSPACE/tests/.env.default
source $VERSITYGW_TEST_ENV
export AWS_PROFILE AWS_REGION BUCKET_ONE_NAME BUCKET_TWO_NAME
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
aws s3 mb s3://$BUCKET_ONE_NAME
aws s3 mb s3://$BUCKET_TWO_NAME
RECREATE_BUCKETS=false $HOME/bin/bats ./tests/s3_bucket_tests.sh
RECREATE_BUCKETS=false $HOME/bin/bats ./tests/posix_tests.sh
aws s3 rb s3://$BUCKET_ONE_NAME
aws s3 rb s3://$BUCKET_TWO_NAME