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

feat(iprod/#379): added integration tests; updated docker-compose #324

Merged
merged 9 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
109 changes: 55 additions & 54 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,48 +269,49 @@ jobs:
- store_artifacts:
path: coverage
destination: test

# TODO: Uncomment when there are integration tests
# test-integration:
# executor: default-machine
# steps:
# - checkout
# - run:
# <<: *defaults_configure_nvm
# - restore_cache:
# key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
# - run:
# name: Create dir for test results
# command: mkdir -p ./test/results
# - run:
# name: Build and start the docker containers
# command: |
# ## This is not needed as we are only doing narrow-integration tests.
# # docker-compose build

# ## Lets pull only the Services needed for the Integration Test
# docker-compose pull mysql kafka init-kafka

# ## Lets startup only the Services needed for the Integration Test
# docker-compose up -d mysql kafka init-kafka

# ## Check straight away to see if any containers have exited
# docker-compose ps

# ## wait for services to be up and running
# npm run wait-4-docker
# - run:
# name: Run the integration tests
# command: |
# npm rebuild
# npm run test:int
# environment:
# ENDPOINT_URL: http://localhost:4545/notification
# - store_artifacts:
# path: ./test/results
# destination: test
# - store_test_results:
# path: ./test/results

test-integration:
executor: default-machine
steps:
- checkout
- run:
<<: *defaults_configure_nvm
- restore_cache:
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Create dir for test results
command: mkdir -p ./test/results
# - run:
# name: Build and start the docker containers
# command: |
# ## This is not needed as we are only doing narrow-integration tests.
# # docker-compose build
# ## Lets pull only the Services needed for the Integration Test
# docker-compose pull mysql kafka init-kafka
# ## Lets startup only the Services needed for the Integration Test
# docker-compose up -d mysql kafka init-kafka
# ## Check straight away to see if any containers have exited
# docker-compose ps
# ## wait for services to be up and running
# npm run wait-4-docker
- run:
name: Prepare test environment
command: |
pwd
chmod +x ./test/integration/scripts/start.sh
./test/integration/scripts/start.sh
- run:
name: Run the integration tests
command: |
npm rebuild
npm run test:int
# environment:
# ENDPOINT_URL: http://localhost:4545/notification
# - store_artifacts:
# path: ./test/results
# destination: test
# - store_test_results:
# path: ./test/results

vulnerability-check:
executor: default-docker
Expand Down Expand Up @@ -741,17 +742,17 @@ workflows:
ignore:
- /feature*/
- /bugfix*/
# - test-integration:
# context: org-global
# requires:
# - setup
# filters:
# tags:
# only: /.*/
# branches:
# ignore:
# - /feature*/
# - /bugfix*/
- test-integration:
context: org-global
requires:
- setup
filters:
tags:
only: /.*/
branches:
ignore:
- /feature*/
- /bugfix*/
# - test-functional:
# context: org-global
# requires:
Expand Down Expand Up @@ -889,4 +890,4 @@ workflows:
only: /v[0-9]+(\.[0-9]+)*\-snapshot+((\.[0-9]+)?)/
branches:
ignore:
- /.*/
- /.*/
7 changes: 4 additions & 3 deletions .ncurc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Add a TODO comment indicating the reason for each rejected dependency upgrade added to this list, and what should be done to resolve it (i.e. handle it through a story, etc).
## Add a comment indicating the reason for each rejected dependency upgrade added to this list, and what should be done to resolve it (i.e. handle it through a story, etc).
reject: [
"json-rules-engine",
"eslint"
]
"eslint",
"@mojaloop/sdk-standard-components" # Version 17.4.0 introduced the bug: this.logger.isDebugEnabled is not a function
]
6 changes: 4 additions & 2 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"GHSA-qgmg-gppg-76g5",
"GHSA-f9xv-q969-pqx4",
"GHSA-p9pc-299p-vxgp",
"GHSA-7fh5-64p2-3v2j" // https://github.com/advisories/GHSA-7fh5-64p2-3v2j
]
"GHSA-7fh5-64p2-3v2j", // https://github.com/advisories/GHSA-7fh5-64p2-3v2j
"GHSA-c429-5p7v-vgjp", // https://github.com/advisories/GHSA-c429-5p7v-vgjp
"GHSA-78xj-cgh5-2h22" // https://github.com/advisories/GHSA-78xj-cgh5-2h22
]
}
103 changes: 0 additions & 103 deletions docker-compose.base.yml

This file was deleted.

Loading
Loading