Merge pull request #3793 from nymtech/qa/fix-api-tests

change ci to run against sandbox for tests
This commit is contained in:
Tommy Verrall
2023-08-22 10:55:24 +02:00
committed by GitHub
4 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -32,5 +32,5 @@ jobs:
run: yarn
- name: Run tests
run: yarn test:qa
run: yarn test:sandbox
working-directory: nym-api/tests
+1 -1
View File
@@ -7,7 +7,7 @@
"test": "test"
},
"scripts": {
"test:qa": "TEST_ENV=qa jest --forceExit --detectOpenHandles --passWithNoTests",
"test:sandbox": "TEST_ENV=sandbox jest --forceExit --detectOpenHandles --passWithNoTests",
"test:prod": "TEST_ENV=prod jest --forceExit --detectOpenHandles --passWithNoTests",
"build": "tsc",
"lint": "eslint --ext .js,.ts,.tsx .",
+6 -5
View File
@@ -2,12 +2,13 @@ common:
request_headers:
Accept: application/json
Content-Type: application/json
qa:
api_base_url: https://qwerty-validator-api.qa.nymte.ch/api/v1
mix_id: 63
identity_key: 4Yr4qmEHd9sgsuQ83191FR2hD88RfsbMmB4tzhhZWriz
gateway_identity: 336yuXAeGEgedRfqTJZsG2YV7P13QH1bHv1SjCZYarc9
sandbox:
api_base_url: https://sandbox-nym-api1.nymtech.net/api/v1
mix_id: 7
identity_key: 2wEzyW6Pihk19xbCK9kB81vYuDFUvTzTAr77arvxdfSg
gateway_identity: HjNEDJuotWV8VD4ufeA1jeheTnfNJ7Jorevp57hgaZua
log_level: error
time_zone: utc
prod:
api_base_url: https://validator.nymtech.net/api/v1
mix_id: 730
+2 -2
View File
@@ -6,7 +6,7 @@ import YAML from "yaml";
class ConfigHandler {
private static instance: ConfigHandler;
private validEnvironments = ["qa", "prod"];
private validEnvironments = ["sandbox", "prod"];
public commonConfig: { request_headers: object };
@@ -23,7 +23,7 @@ class ConfigHandler {
private constructor() {
this.setCommonConfig();
this.setEnvironmentConfig(process.env.TEST_ENV || "qa" || "prod");
this.setEnvironmentConfig(process.env.TEST_ENV || "sandbox" || "prod");
}
public static getInstance(): ConfigHandler {