Skip to content

Commit

Permalink
dev e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
sbcgua committed Feb 22, 2020
1 parent eacf1a5 commit 71b9849
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lambda.e2e.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const fetch = require('node-fetch');
const pick = require('lodash.pick');

const PREFIX = '';
const HOST = 'shield.abap.space';
const PREFIX = (process.env.E2E_DEV === '1') ? 'dev.' : '';
const HOST = PREFIX + 'shield.abap.space';
const functionName = 'version-shield-json';
const versionRe = /^v\d{1,3}\.\d{1,3}(\.\d{1,3})?$/i;
console.log('Host:', HOST);

const getUrl = (params) => `https://${PREFIX}${HOST}/${functionName}/${params}`;
const getUrl = (params) => `https://${HOST}/${functionName}/${params}`;

async function validateExpectations(resp) {
expect(resp.ok).toBeTruthy();
Expand All @@ -26,7 +27,7 @@ test('should process abap constant', async () => {
await validateExpectations(resp);
});

test('should process abap constant', async () => {
test('should process apack', async () => {
const resp = await fetch(getUrl('github/SAP-samples/abap-platform-jak/.apack-manifest.xml'));
await validateExpectations(resp);
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"test": "jest",
"test:watch": "jest --watch",
"test:e2e": "jest -c jest.e2e.config.js",
"test:e2e-dev": "env E2E_DEV=1 jest -c jest.e2e.config.js",
"lint": "eslint . lib",
"deploy-dev": "bash ./bin/deploy-dev.sh",
"deploy-prod": "bash ./bin/deploy-dev.sh",
Expand Down

0 comments on commit 71b9849

Please sign in to comment.