mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Add module config test
This commit is contained in:
parent
49a253e8eb
commit
0265c5d695
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user