2020-10-01 - Integration Test Config - Functions

From Izara Wiki
Jump to navigation Jump to search

Service - Integration Test Config

Lambda Functions

getIntegrationTests

/**
 * Returns an array of integration test configs
 * @param {string} [serviceName] - Only return tests where initialStage serviceName matches
 * @param {string} [resourceType] - Only return tests where initialStage resourceType matches
 * @param {string} [resourceName] - Only return tests where initialStage resourceName matches
 * @param {string[]} [integrationTestTags] - Only return tests with matching integrationTestTags
 *
 * @returns {object} One resource configuration
 */
module.exports.getIntegrationTests = (serviceName, resourceType, resourceName, integrationTestTags) => {

integrationTestTags / serviceName / resourceType / resourceName parameters are optional, if excluded then all tests will be returned. If integrationTestTags is defined then serviceName / resourceType / resourceName are ignored.

getEventConfig

/**
 * Get the configuration for one event
 * @param {string} eventTag - Tag of the event required
 *
 * @returns {object} One event configuration
 */
module.exports.getEventConfig = (eventTag) => {