Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from postman to bruno for integration tests #2197

Merged
merged 19 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
fe67e05
Initial bruno test commit
andrewbrazzatti May 21, 2024
0a4da78
Added set cookie pre request scripts for the rest of the tests that r…
andrewbrazzatti May 22, 2024
adfaf21
Fixed List Attachments for Datarecord test
andrewbrazzatti May 22, 2024
5ac4196
Added OpenID Connect tests
andrewbrazzatti May 22, 2024
4503c34
Added docker compose to run bruno tests. Fixed up configuration to wo…
andrewbrazzatti May 22, 2024
559b9d3
Added config to run bruno tests on CircleCI
andrewbrazzatti May 22, 2024
6411939
Tidied up writing of test report
andrewbrazzatti May 22, 2024
bed4c97
Removed Solr test as it should really be done as part of the Mocha tests
andrewbrazzatti May 22, 2024
c41a3ae
Added npm install command required to get mocha inside node_modules.
andrewbrazzatti May 23, 2024
86d2d1b
Added missing tests from current develop branch postman
May 23, 2024
e2191cf
Merge branch 'feature/bru-integration-tests' of github.com:redbox-min…
May 23, 2024
98a2e15
Ported final tests from postman to bruno
andrewbrazzatti May 23, 2024
94dbc7c
Updated mocha tests to use latest mongo image
andrewbrazzatti May 23, 2024
1415893
Fixed mongodb docker label
andrewbrazzatti May 23, 2024
cd619cd
run bruno and remove postman
cofiem May 27, 2024
bebc4c7
run bruno and remove postman
cofiem May 27, 2024
00f0979
ensure junit output dirs are available
cofiem May 27, 2024
aada9a2
reuse npm run instead of duplicate docker compose command
cofiem May 27, 2024
d7e84ca
make .tmp folders consistently created in top-level dir
cofiem May 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,31 @@ jobs:
command: |
mkdir -p /tmp/.codecov-cli
cd /tmp/.codecov-cli
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os https://cli.codecov.io/latest/linux/codecov
curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
- run:
name: Run Postman and Mocha tests with code coverage
name: Run Bruno and Mocha tests with code coverage
command: |
sudo mkdir -p .tmp/junit
sudo chmod -R 777 .
cd support/integration-testing
sudo mkdir -p .tmp/junit/backend-bruno
sudo mkdir -p .tmp/junit/backend-mocha
sudo mkdir -p .tmp/attachments/staging
sudo chmod -R 777 .
docker-compose -f docker-compose.newman.yml up --abort-on-container-exit --exit-code-from redboxportal
docker-compose -f docker-compose.mocha.yml up --abort-on-container-exit --exit-code-from redboxportal
cd support/integration-testing
npm run test:bruno
npm run test:bruno:clean
npm run test:mocha
npm run test:mocha:clean
- run:
name: Upload newman and mocha code coverage
name: Upload Bruno and mocha code coverage
command: |
/tmp/.codecov-cli/codecov --verbose upload-process --fail-on-error --disable-search \
--token "${CODECOV_TOKEN}" --name "job-${CIRCLE_BUILD_NUM}-${CIRCLE_BRANCH}" \
--flag "backend-newman" --file "./coverage/newman/lcov.info"
--flag "backend-bruno" --file "./coverage/bruno/lcov.info"
/tmp/.codecov-cli/codecov --verbose upload-process --fail-on-error --disable-search \
--token "${CODECOV_TOKEN}" --name "job-${CIRCLE_BUILD_NUM}-${CIRCLE_BRANCH}" \
--flag "backend-mocha" --file "./coverage/mocha/lcov.info"
Expand Down
8 changes: 4 additions & 4 deletions config/env/integrationtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
log: {
level: 'verbose'
},
appUrl:'http://localhost:1500',
appUrl:'http://redboxportal:1500',
record:{
baseUrl: {
redbox: "http://redbox:9000/redbox",
Expand Down Expand Up @@ -67,7 +67,7 @@ module.exports = {
secretOrKey: 'Y30wY4xv1*6I7yUX%6v*Tzce8OEbVO&@R4hVb%2@Gehtx^xgOqQ97Slv!ZOkfHHmox&x0zAt*0o&4^8$9oW8WTf&r@&d31EFbQZr',
jsonWebTokenOptions: {
issuer: 'https://rapid.test.aaf.edu.au',
audience: 'http://localhost:1500/default/rdmp/',
audience: 'http://redboxportal:1500/default/rdmp/',
ignoreNotBefore: true
}
}
Expand Down Expand Up @@ -95,8 +95,8 @@ module.exports = {
client: {
client_id: 'redbox',
client_secret: 'w2snramgGaqehPiujV695iUfKmZAJ147',
redirect_uris: ['http://localhost:1500/user/login_oidc'],
post_logout_redirect_uris: ['http://localhost:1500/default/rdmp/user/logout'],
redirect_uris: ['http://redboxportal:1500/user/login_oidc'],
post_logout_redirect_uris: ['http://redboxportal:1500/default/rdmp/user/logout'],
},
params: {
scope: 'openid email profile',
Expand Down
Loading
Loading