mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2025-12-08 20:25:52 +00:00
- Updating CI script to use latest shutdown logic - Removed unneeded tests - Split browser tests into ones that need a Gitlab instance those that down - Removing the need to run the full e2e test unless its a release branch - Moved the most tested release tests (the exports) into a integration test since it doesnt require a full Gitlab instance for testing
908 B
908 B
Testing is a work-in-progress right now but here is the start.
Unit Tests
Run:
yarn test:unit
Integration Tests
- First, run Gitlab in a docker container:
docker-compose -f scripts/docker-compose.yml up
- Once GitLab is up on localhost:8080, get the two environment variables from the docker image could either export them into environment variables locally:
export PERSONAL_ACCESS_TOKEN=$(docker exec -it gitlab bash -lc 'printf "%q" "${PERSONAL_ACCESS_TOKEN}"')
export GITLAB_URL=$(docker exec -it gitlab bash -lc 'printf "%q" "${GITLAB_URL}"')
- Now run the tests
yarn test:integration:node
You can also define them in front of the yarn script
PERSONAL_ACCESS_TOKEN='abcdefg' GITLAB_URL='http://localhost:8080' yarn test
Note it may take about 3 minutes to get the variables while Gitlab is starting up in the container