Wetrade backend
The actual application code here is a bit coupled with the deployment methods. It depends heavily on the /deployments/app_config
folder and currently on the local deployment configuration.
Setup Artifactory token for fabric-interop-sdk
- Go to IBM artifactory (https://na.artifactory.swg-devops.com/artifactory/)
- Click on your email id on top right
- Generate/Copy the API key from profile, let's say it is - "ThisIsMyAPIKey"
- Run this command on your system - curl --header 'X-JFrog-Art-Api: ThisIsMyAPIKey' https://na.artifactory.swg-devops.com/artifactory/api/npm/auth
- The above command will return you auth token along with auth settings and your email id from artifactory.
- Create a .npmrc file in the backend folder (from where you want to run npm install)
- Add this line to your .npmrc file, @res-dlt-interop:registry=https://na.artifactory.swg-devops.com/artifactory/api/npm/res-dlt-interop-npm-local/
- Add the output of curl to that file.
- Final .npmrc should look like this - "@res-dlt-interop:registry=https://na.artifactory.swg-devops.com/artifactory/api/npm/res-dlt-interop-npm-local/ _auth = always-auth = true email = user@email.com"
- Run npm install to check if artifactory connection is working before testing/deployment.
Tests
Integration tests are now provided in test/
folder. They can be run with npm test
but they need the Fabric components to be running to be useful.
Local deployments now automatically run these tests. A separate container starting with test-
is created and run. Look at it's logs to see how the tests perform.