Skip to content

Commit 45c1d70

Browse files
committed
chore: move test url to env var
1 parent 4bd0d86 commit 45c1d70

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ jobs:
9393
env:
9494
TRUSTIFY_DA_PYTHON3_PATH: "${{steps.python-location.outputs.python-bin-location}}/python3"
9595
TRUSTIFY_DA_PIP3_PATH: "${{steps.python-location.outputs.python-bin-location}}/pip3"
96+
TRUSTIFY_DA_DEV_MODE: 'true'
97+
DEV_TRUSTIFY_DA_BACKEND_URL: 'https://exhort.stage.devshift.net'
9698
run: npm run test
9799

98100
- name: Compile project

.github/workflows/stage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ jobs:
120120
if: steps.test-check.outputs.retest-is-needed == 'true'
121121
env:
122122
TRIGGERING_FILE: ${{ steps.test-check.outputs.triggering-file}}
123+
TRUSTIFY_DA_DEV_MODE: 'true'
124+
DEV_TRUSTIFY_DA_BACKEND_URL: 'https://exhort.stage.devshift.net'
123125
run: |
124126
echo "Re-test was triggered!!, triggering changed file - $TRIGGERING_FILE"
125127
echo "Running Again Unit-tests =>"

src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ function readAndPrintVersionFromPackageJson() {
8484
logOptionsAndEnvironmentsVariables("trustify-da-javascript-client analysis started, version: ", packageJson.version)
8585
}
8686

87-
export const exhortDevUrl = 'https://exhort.stage.devshift.net';
88-
8987
/**
9088
* This function is used to determine exhort theUrl backend according to the following logic:
9189
* If TRUSTIFY_DA_DEV_MODE = true, then take the value of the EXHORT BACKEND URL of dev/staging environment in such a way:
@@ -106,7 +104,7 @@ function selectExhortBackend(opts = {}) {
106104

107105
let url;
108106
if (getCustom('TRUSTIFY_DA_DEV_MODE', 'false', opts) === 'true') {
109-
url = getCustom('DEV_TRUSTIFY_DA_BACKEND_URL', exhortDevUrl, opts);
107+
url = getCustom('DEV_TRUSTIFY_DA_BACKEND_URL', undefined, opts);
110108
} else {
111109
url = getCustom('TRUSTIFY_DA_BACKEND_URL', undefined, opts);
112110
}

0 commit comments

Comments
 (0)