Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Environment Health Check Test Template
/********************************************************
**********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
You can’t perform that action at this time.