Last active
August 13, 2019 05:33
-
-
Save AaronMcCaughan/3363f9a53db47b06991e9276c62f9a42 to your computer and use it in GitHub Desktop.
Environment Health Check Test Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************** | |
**********ENVIRONMENT HEALTH CHECK TEMPLATE ************* | |
********************************************************* | |
The template below contains the mandatory export of you run function for our integration hub platform and ensures the main function returns a promise. | |
The outcome of your test should return the result via a Promise.Resolve(); | |
resolve('Online'); Sets the environment health status to 'Online' | |
resolve('Offline'); Sets the environment health status to 'Offline' | |
resolve('Issue'); Sets the environment health status to 'Issue' | |
resolve('Unknown'); Sets the environment health status to 'Unknown' | |
Any thrown errors during script execution or a call to Reject will be treated as a result of Unknown | |
reject(true); Sets the environment health status to 'Unknown' | |
*/ | |
let run = function (args) { | |
return new Promise(async function (resolve, reject) { | |
console.log('Beginning EnvironmentCheck test'); | |
//Insert test code here. | |
console.log('Test Passed'); | |
console.log('Completed EnvironmentCheck test'); | |
resolve('Online'); | |
}); | |
}; | |
module.exports = { | |
run: run | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment