Module for running arbitrary tests
Print out the data passed into the function *args and `kwargs, this is used to both test the publication data and cli argument passing, but also to display the information available within the publication data. Returns {"args": args, "kwargs": kwargs}.
CLI Example:
salt '*' test.arg 1 "two" 3.1 txt="hello" wow='{a: 1, b: "hello"}'
Print out the data passed into the function *args and `kwargs, this is used to both test the publication data and cli argument passing, but also to display the information available within the publication data. Returns {"args": repr(args), "kwargs": repr(kwargs)}.
CLI Example:
salt '*' test.arg_repr 1 "two" 3.1 txt="hello" wow='{a: 1, b: "hello"}'
Print out the types of the args and kwargs. This is used to test the types of the args and kwargs passed down to the minion
CLI Example:
salt '*' test.arg_type 1 'int'
Execute the collatz conjecture from the passed starting number, returns the sequence and the time it took to compute. Used for performance tests.
CLI Example:
salt '*' test.collatz 3
Return the value for test.foo in the minion configuration file, or return the default value
CLI Example:
salt '*' test.conf_test
Execute a minion function via the __salt__ object in the test module, used to verify that the minion functions can be called via the __salt__ module.
CLI Example:
salt '*' test.cross_test file.gid_to_group 0
Return a string - used for testing the connection
CLI Example:
salt '*' test.echo 'foo bar baz quo qux'
Return a Fibonacci sequence up to the passed number, and the timeit took to compute in seconds. Used for performance tests
CLI Example:
salt '*' test.fib 3
Return the configuration options passed to this minion
CLI Example:
salt '*' test.get_opts
Print out the data passed into the function **kwargs, this is used to both test the publication data and cli kwarg passing, but also to display the information available within the publication data.
CLI Example:
salt '*' test.kwarg num=1 txt="two" env='{a: 1, b: "hello"}'
List the modules that were not loaded by the salt loader system
CLI Example:
salt '*' test.not_loaded
Return an opts package with the grains and opts for this minion. This is primarily used to create the options used for master side state compiling routines
CLI Example:
salt '*' test.opts_pkg
Test the outputter, pass in data to return
CLI Example:
salt '*' test.outputter foobar
Just used to make sure the minion is up and responding Return True
CLI Example:
salt '*' test.ping
Pass in a function name to discover what provider is being used
CLI Example:
salt '*' test.provider service
Return a dict of the provider names and the files that provided them
CLI Example:
salt '*' test.providers
Sleep for a random number of seconds, used to test long-running commands and minions returning at differing intervals
CLI Example:
salt '*' test.rand_sleep 60
Test that the returncode system is functioning correctly
CLI Example:
salt '*' test.retcode 42
Instruct the minion to initiate a process that will sleep for a given period of time.
CLI Example:
salt '*' test.sleep 20
Echo a string to a specific tty
CLI Example:
salt '*' test.tty tty0 'This is a test'
salt '*' test.tty pts3 'This is a test'
Return the version of salt on the minion
CLI Example:
salt '*' test.version
Returns versions of components used by salt as a dict
CLI Example:
salt '*' test.versions_information
Returns versions of components used by salt
CLI Example:
salt '*' test.versions_report
Current Salt release: 2014.1.6
Docs for previous releases on salt.rtfd.org.