Skip to content

Commit

Permalink
test: resolve flaky cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Mar 24, 2021
1 parent d6c8209 commit 356b05f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ jobs:

- go/mod-download-cached

- run: ./test/e2e/circle-ci.bash memory --record
- run: ./test/e2e/circle-ci.bash memory-jwt --record
- run: ./test/e2e/circle-ci.bash postgres --record
- run: ./test/e2e/circle-ci.bash postgres-jwt --record
- run: ./test/e2e/circle-ci.bash cockroach --record
- run: ./test/e2e/circle-ci.bash cockroach-jwt --record
- run: ./test/e2e/circle-ci.bash mysql --record
- run: ./test/e2e/circle-ci.bash mysql-jwt --record
- run: ./test/e2e/circle-ci.bash memory
- run: ./test/e2e/circle-ci.bash memory-jwt
- run: ./test/e2e/circle-ci.bash postgres
- run: ./test/e2e/circle-ci.bash postgres-jwt
- run: ./test/e2e/circle-ci.bash cockroach
- run: ./test/e2e/circle-ci.bash cockroach-jwt
- run: ./test/e2e/circle-ci.bash mysql
- run: ./test/e2e/circle-ci.bash mysql-jwt

workflows:
bdt:
Expand Down
10 changes: 1 addition & 9 deletions test/e2e/circle-ci.bash
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,14 @@ export LOG_LEAK_SENSITIVE_VALUES=true
export TEST_DATABASE_SQLITE="sqlite://$(mktemp -d -t ci-XXXXXXXXXX)/e2e.sqlite?_fk=true"

WATCH=no

for i in "$@"
do
case $i in
--watch)
WATCH=yes
shift # past argument=value
;;
--record)
RECORD=yes
shift # past argument=value
;;
*)

case "$i" in
memory)
./hydra migrate sql --yes $TEST_DATABASE_SQLITE > ./hydra-migrate.e2e.log 2>&1
Expand Down Expand Up @@ -150,9 +144,7 @@ npm run wait-on -- -l -t 300000 \
if [[ $WATCH = "yes" ]]; then
(cd ../..; npm run test:watch)
else
if [[ $RECORD = "yes" ]]; then
(cd ../..; npm run test -- --record )
fi
(cd ../..; npm run test)
fi

kill %1 || true # This is oauth2-client
Expand Down

0 comments on commit 356b05f

Please sign in to comment.