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

Commit

Permalink
Fix openwhiskProvider.js test
Browse files Browse the repository at this point in the history
  • Loading branch information
KeonHee committed Apr 9, 2021
1 parent 8108079 commit ac54f84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions provider/tests/openwhiskProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('OpenwhiskProvider', () => {
const creds = {apihost: 'some_api', auth: 'user:pass'}
sandbox.stub(openwhiskProvider, "props").returns(BbPromise.resolve(creds))
return openwhiskProvider.client().then(client => {
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})
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, agent: undefined, proxy: undefined})
expect(typeof openwhiskProvider._client).to.not.equal('undefined');
})
})
Expand All @@ -71,7 +71,7 @@ describe('OpenwhiskProvider', () => {
sandbox.stub(openwhiskProvider, "props").returns(BbPromise.resolve(creds))
openwhiskProvider.serverless.service.provider.ignore_certs = true
return openwhiskProvider.client().then(client => {
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})
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, agent: undefined, proxy: undefined})
expect(typeof openwhiskProvider._client).to.not.equal('undefined');
})
})
Expand All @@ -81,7 +81,7 @@ describe('OpenwhiskProvider', () => {
const creds = {apihost: 'some_api', auth: 'user:pass', apigw_access_token: 'token'}
sandbox.stub(openwhiskProvider, "props").returns(BbPromise.resolve(creds))
return openwhiskProvider.client().then(client => {
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})
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, agent: undefined, proxy: undefined})
expect(typeof openwhiskProvider._client).to.not.equal('undefined');
})
})
Expand Down

0 comments on commit ac54f84

Please sign in to comment.