Skip to content

Commit

Permalink
Merge pull request #135 from ministryofjustice/EL-1440-add-conditiona…
Browse files Browse the repository at this point in the history
…l-fala-tests

EL-1440 - add FALA_TESTS_ONLY config variable
  • Loading branch information
starswan authored Apr 19, 2024
2 parents ef0a57d + e55162f commit 633dee8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
6 changes: 6 additions & 0 deletions behave/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ functionality in this directory.

Each feature file is seperated out into their own directory to help make it easier to organise each services test.

## Testing branches in Circleci

When you need to test a targeted branch in CircleCi, you will need to add
`echo "export E2E_BRANCH= >> $BASH_ENV` within your targeted branch projects CircleCi config.
This will need to be applied under your projects CircleCi config `behave` values.

Cla_backend feature files:

`behave > features > cla_backend`
Expand Down
1 change: 1 addition & 0 deletions behave/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ services:
CLA_PROVIDER_CLIENT_ID: 59657ed22d980251cdd3
CLA_PROVIDER_SECRET_ID: 0494287c65bdf61d29f0eeed467ec8e090f0d80f
DATABASE_SNAPSHOT_ENABLED: ${DATABASE_SNAPSHOT_ENABLED:-false}
FALA_TESTS_ONLY: ${FALA_TESTS_ONLY:-false}
PGPASSWORD: postgres
PGUSER: postgres
PGHOST: db
Expand Down
12 changes: 8 additions & 4 deletions behave/wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
export A11Y=${A11Y_ENABLED:-false}
echo "A11Y is $A11Y"

#
# execute behave
#
TAGS=""
# Run only FALA tagged tests
if [ "$FALA_TESTS_ONLY" = "true" ]
then
TAGS="--tags=@fala"
fi
echo "TAGS is $TAGS"

exec behave "-D a11y=$A11Y"
exec behave "-D a11y=$A11Y" $TAGS
# Clean up downloads
rm -rf data/downloads/*
4 changes: 2 additions & 2 deletions orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ commands:
role_arn: $CLA_PUBLIC_ECR_ROLE_TO_ASSUME
region: ECR_REGION
- run: |
cd $E2E_WORKING_DIRECTORY
./.circleci/pull_images clapublic
cd $E2E_WORKING_DIRECTORY
./.circleci/pull_images clapublic
# Pull cla_backend image
- aws-cli/setup:
Expand Down

0 comments on commit 633dee8

Please sign in to comment.