Skip to content

Instantly share code, notes, and snippets.

@AaronMcCaughan
Last active August 13, 2019 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AaronMcCaughan/3363f9a53db47b06991e9276c62f9a42 to your computer and use it in GitHub Desktop.
Save AaronMcCaughan/3363f9a53db47b06991e9276c62f9a42 to your computer and use it in GitHub Desktop.
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