tree: e7fe107c31789d039cb55f244e35b8f897bd2bc3 [path history] [tgz]
  1. actions.test.js
  2. activations.test.js
  3. feeds.test.js
  4. namespaces.test.js
  5. packages.test.js
  6. prepIntegrationTests.sh
  7. README.md
  8. routes.test.js
  9. rules.test.js
  10. triggers.test.js
  11. utils.js
test/integration/README.md

Integrations Test


Running the integration tests requires the following environment variables to be defined.

export __OW_API_KEY=<your api key>
export __OW_API_HOST=<openwhisk API hostname>
export __OW_NAMESPACE=<openwhisk namespace>
export __OW_APIGW_TOKEN=<api gateway token>

You can retrieve these settings from the .wskprops file.

Further, you need to create the following seed artifacts.

Action

  • Name: hello
function main() {
   return {payload: 'Hello world'};
}

Action

  • Name: tests
function main() {
   return {payload: 'Hello world'};
}

Trigger

  • Name: sample

If you have the wsk CLI installed, you may create the required actions and trigger as follows:

wsk action  create hello action.js
wsk action  create tests action.js
wsk trigger create sample

where action.js contains the main function shown above.

Note: If the tests fail, the cleanup code does not currently run. You will need to remove the created artifacts manually.