Add module config test

This commit is contained in:
Thomas S Hatch 2011-04-07 10:55:12 -06:00
parent 49a253e8eb
commit 0265c5d695

View File

@ -4,6 +4,11 @@ Module for running arbitrairy tests
import time
# Load in default options for the module
__opts__ = {
'test.foo': 'foo'
}
def echo(text):
'''
Return a string - used for testing the connection
@ -24,6 +29,16 @@ def ping():
'''
return True
def conf_test():
'''
Return the value for test.foo in the minion configuration file, or return
the default value
CLI Example:
salt '*' test.ping
'''
return __opts__['test.foo']
def fib(num):
'''
Return a fibonachi sequence up to the passed number, and the time it took