saltstack/salt — pull request #16563 by mzdaniel (2014-10-10 23:33:05+00:00)
Title: Added salt-ssh integration test for custom module within SLS

This PR reproduce the issue mention in #16271

As of aa6f87e62, this integration test is giving the following output

```
$ python2 tests/runtests.py -C --ssh
. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Transplanting configuration files to '/tmp/salt-tests-tmpdir/config'
* Current Directory: /tmp/salt2
* Test suite is running under PID 1750
* Logging tests on /tmp/salt-runtests.log
. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Setting up Salt daemons to execute tests
. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Waiting at most 0:02:00 for minions(minion, sub_minion) to connect back
* minion connected.
* sub_minion connected.
* Syncing minion's modules (saltutil.sync_modules)
* Synced minion modules: modules.override_test, modules.runtests_decorators, modules.runtests_helpers, modules.salttest
* Synced sub_minion modules: modules.override_test, modules.runtests_decorators, modules.runtests_helpers, modules.salttest
* Syncing minion's states (saltutil.sync_states)
* Synced minion states: states.salttest
* Synced sub_minion states: states.salttest
* Initializing SSH subsystem
. ===============================================================================
. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting CLI Tests
. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
....[ERROR ] Git-based ext_pillar is enabled in configuration but could not be loaded, is GitPython installed?
[CRITICAL] Specified ext_pillar interface git is unavailable
[CRITICAL] Specified ext_pillar interface git is unavailable
[CRITICAL] Specified ext_pillar interface test_ext_pillar_opts is unavailable
F
. =====================================================================
FAIL: test_ssh_sls_with_custom_module (integration.cli.custom_module.SSHCustomModuleTest)
. ----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/salt2/tests/integration/cli/custom_module.py", line 71, in test_ssh_sls_with_custom_module
raise AssertionError(cmd[key]['comment'])
AssertionError: Module function test.recho is not available

. ----------------------------------------------------------------------
Ran 5 tests in 38.387s

FAILED (failures=1)

. ============================== Overall Tests Report ================================
*** CLI Tests *****************************************************************************************************
. -------- Failed Tests --------------------------------------------------------------------------------------------------
-> integration.cli.custom_module.SSHCustomModuleTest.test_ssh_sls_with_custom_module ................
Traceback (most recent call last):
File "/tmp/salt2/tests/integration/cli/custom_module.py", line 71, in test_ssh_sls_with_custom_module
raise AssertionError(cmd[key]['comment'])
AssertionError: Module function test.recho is not available
. ......................................................................................................................................................
. ----------------------------------------------------------------------------------------------------------------------------
. ==============================================================================
FAILED (total=5, skipped=0, passed=4, failures=1, errors=0)
. ================================ Overall Tests Report ==============================
```