Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit f9208f6

Browse files
committed
Fixing broken unit tests due to SDK release.
Also, updating vulnerable packages to latest versions
1 parent 5fc12f1 commit f9208f6

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
},
99
"scripts": {
1010
"test": "istanbul cover -x '**/*.test.js' node_modules/mocha/bin/_mocha tests/all -- -R spec --recursive",
11-
"lint": "eslint .",
1211
"report": "istanbul report lcovonly && codecov"
1312
},
1413
"repository": {
@@ -35,22 +34,16 @@
3534
"fs-extra": "^1.0.0",
3635
"get-stdin": "^5.0.1",
3736
"jszip": "^3.1.3",
38-
"lodash": "^4.17.4",
37+
"lodash": "^4.17.11",
3938
"moment": "^2.16.0",
40-
"openwhisk": "^3.18.0"
39+
"openwhisk": "^3.19.0"
4140
},
4241
"devDependencies": {
43-
"chai-as-promised": "^6.0.0",
4442
"chai": "^3.5.0",
45-
"coveralls": "^2.11.12",
46-
"eslint": "^3.3.1",
47-
"eslint-config-airbnb": "^10.0.1",
48-
"eslint-config-airbnb-base": "^5.0.2",
49-
"eslint-plugin-import": "^1.13.0",
50-
"eslint-plugin-jsx-a11y": "^2.1.0",
51-
"eslint-plugin-react": "^6.1.1",
43+
"chai-as-promised": "^6.0.0",
44+
"coveralls": "^3.0.3",
5245
"istanbul": "^0.4.4",
53-
"mocha": "^3.0.2",
46+
"mocha": "^6.1.2",
5447
"mocha-lcov-reporter": "^1.2.0",
5548
"mock-require": "^1.3.0",
5649
"proxyquire": "^1.7.10",

provider/tests/openwhiskProvider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('OpenwhiskProvider', () => {
5959
const creds = {apihost: 'some_api', auth: 'user:pass'}
6060
sandbox.stub(openwhiskProvider, "props").returns(BbPromise.resolve(creds))
6161
return openwhiskProvider.client().then(client => {
62-
expect(client.actions.client.options).to.be.deep.equal({apigwToken: undefined, apigwSpaceGuid: undefined, namespace: undefined, apiKey: creds.auth, ignoreCerts: false, api: `https://${creds.apihost}/api/v1/`, authHandler: undefined, noUserAgent: undefined})
62+
expect(client.actions.client.options).to.be.deep.equal({apigwToken: undefined, apigwSpaceGuid: undefined, namespace: undefined, apiKey: creds.auth, ignoreCerts: false, apiVersion: 'v1', cert: undefined, key: undefined, api: `https://${creds.apihost}/api/v1/`, authHandler: undefined, noUserAgent: undefined})
6363
expect(typeof openwhiskProvider._client).to.not.equal('undefined');
6464
})
6565
})
@@ -70,7 +70,7 @@ describe('OpenwhiskProvider', () => {
7070
sandbox.stub(openwhiskProvider, "props").returns(BbPromise.resolve(creds))
7171
openwhiskProvider.serverless.service.provider.ignore_certs = true
7272
return openwhiskProvider.client().then(client => {
73-
expect(client.actions.client.options).to.be.deep.equal({apigwToken: undefined, apigwSpaceGuid: undefined, namespace: undefined, apiKey: creds.auth, ignoreCerts: true, api: `https://${creds.apihost}/api/v1/`, authHandler: undefined, noUserAgent: undefined})
73+
expect(client.actions.client.options).to.be.deep.equal({apigwToken: undefined, apigwSpaceGuid: undefined, namespace: undefined, apiKey: creds.auth, ignoreCerts: true, apiVersion: 'v1', cert: undefined, key: undefined, api: `https://${creds.apihost}/api/v1/`, authHandler: undefined, noUserAgent: undefined})
7474
expect(typeof openwhiskProvider._client).to.not.equal('undefined');
7575
})
7676
})
@@ -80,7 +80,7 @@ describe('OpenwhiskProvider', () => {
8080
const creds = {apihost: 'some_api', auth: 'user:pass', apigw_access_token: 'token'}
8181
sandbox.stub(openwhiskProvider, "props").returns(BbPromise.resolve(creds))
8282
return openwhiskProvider.client().then(client => {
83-
expect(client.actions.client.options).to.be.deep.equal({apigwToken: 'token', apigwSpaceGuid: 'user', namespace: undefined, apiKey: creds.auth, ignoreCerts: false, api: `https://${creds.apihost}/api/v1/`, authHandler: undefined, noUserAgent: undefined})
83+
expect(client.actions.client.options).to.be.deep.equal({apigwToken: 'token', apigwSpaceGuid: 'user', namespace: undefined, apiKey: creds.auth, ignoreCerts: false, apiVersion: 'v1', cert: undefined, key: undefined, api: `https://${creds.apihost}/api/v1/`, authHandler: undefined, noUserAgent: undefined})
8484
expect(typeof openwhiskProvider._client).to.not.equal('undefined');
8585
})
8686
})

0 commit comments

Comments
 (0)