Skip to content

Commit

Permalink
fix: setting up e2e yml for test env
Browse files Browse the repository at this point in the history
  • Loading branch information
trunekm committed Jun 2, 2021
1 parent 2c654d8 commit 9520a3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/treetracker-wallet-api-test-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install mocha
run: npm install -g mocha
- run: npm ci
- run: ${{ secrets.TEST_ENV }} node -e "console.log('env password:%s, database:%s, database_schema:%s, username:%s, host:%s, port:%s',process.env.DB_PASSWORD && process.env.DB_PASSWORD.replace(/\w/g,'x'), process.env.DB_NAME, process.env.DB_SCHEMA, process.env.DB_HOST, process.env.DB_USERNAME, process.env.DB_PORT )"
- run: ${{ secrets.TEST_ENV }} NODE_TLS_REJECT_UNAUTHORIZED='0' mocha --config ./__tests__/e2e/.mocharc.js
# - run: ${{ secrets.TEST_ENV }} node -e "console.log('env password:%s, database:%s, database_schema:%s, username:%s, host:%s, port:%s',process.env.DB_PASSWORD && process.env.DB_PASSWORD.replace(/\w/g,'x'), process.env.DB_NAME, process.env.DB_SCHEMA, process.env.DB_HOST, process.env.DB_USERNAME, process.env.DB_PORT )"
2 changes: 2 additions & 0 deletions __tests__/e2e/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ require("dotenv").config();
let request = require("supertest")("https://dev-k8s.treetracker.org/wallet");
if (process.env.ENV === 'dev')
request = require("supertest")("https://dev-k8s.treetracker.org/wallet");
if (process.env.ENV === 'test')
request = require("supertest")("https://test-k8s.treetracker.org/wallet");
// const request = require("supertest")("https://dev-k8s.treetracker.org/wallet");
const expect = require("chai").expect;
const responseStatus = require("http-status-codes");
Expand Down

0 comments on commit 9520a3d

Please sign in to comment.