The point of these tests originally was to verify the proper location
of a log file. Checking return codes is just spurious and ties the test
too closely with the shutdown behavior of the daemons which are tracked and tested
in other places more closely and with more accuracy.
* Change "unknown" user to "some_unknown_user_xyz" since "unknown"
*is* a valid user
* Add timeout to proxy test_exit_status_no_proxyid() since a known
failure case is to infinitely loop with an error.
* Always force the source code tree under test to be the first entry
in PYTHONPATH (excluding verbatim_env)
* Ensure current user is used to start minions
* Better logging strategy
* Start up multiple minions for SysV init script test (had been previously disabled)
* Track pid files for all minions running
* Change the .config attribute to .config_base and .configs as a dictionary of configs
* A config has multiple parts
:name: the key in the .configs dictionary
:path: the path where the config is written (when absent defaults to .config_dir and config name)
:map: the contents of the config (for salt programs this is a dictionary)
* Values can be substituted into the config contents using standard python string formatting labels
* Add a .config_attrs which maps object attributes into config space
* Directories for make_dirtree() can reference object attributes using leading '&'
* Add a ``testprogram.TestProgramCase()`` to simplify test classes
+ Has ``setUp()`` and ``tearDown()`` to create ephemeral test directory
(really should be moved to salttesting.TestCase)
+ Common ``assert_exit_status()`` for validating and reporting failures in
exit status.
* Add missing ``testprogram.TestDaemonSaltProxy`` class
* Remove specific setting of ``program`` parameter in initialization of
``TestDaemonSaltMinion`` since ``testprogram.TestSaltProgramMeta`` already
handles that unless a specific override is required.
* Automatically set ``user`` in config for master, minion and proxy test
classes if a specific user is not specified.
* Automatically set ``PYTHONPATH`` as ``sys.path`` unless it is specified.
* * Improve init script: specifically manage salt configurations rather than arbitrary salt processes
Unfortunately SysV init scripts tend to rummage through PIDs filtering for
appropriate processes to manage. Unfortunately the filters are usually weak
and don't account for similar processes run by other users, PIDs of dead
processes being re-used for completely different executables, etc.. These
weaknesses can result in killing unrelated processes with potentially serious
results.
These improvements to the SysV init script is a complete rewrite with the
following improvements:
* Specifically manage individual salt configurations rather than looking for
salt minion-like processes.
* Obtain salt minion information from the salt configuration - use the
information to manage the specifically configured process.
* Drop all of the platform-specific helper functions that allow the
previously-mentioned weaknesses.
+ Unfortunately this means that the output information may not match the
specific platform (this could easily be corrected).
* Now can manage multiple salt processes started by different users
+ Unfortunately starts/stops/restarts as a group and is unable to manage
them both as a group or as individual processes (this could easily be
corrected)
The new initscript also allows various control variables to be overridden by
environment variables or through settings put in ``/etc/sysconf/salt`` or
``/etc/default/salt``.
:SALTMINION_DEBUG: Dump each line expansion before execution, output system
information on failure. Default: unset
:SALTMINION_BINDIR: Location of ``salt-minion``, ``salt-call`` and other
executables. Default: ``/usr/bin``
:SALTMINION_SYSCONFDIR: The parent directory for the ``salt`` configuration
directory and the ``sysconfig`` or ``default``
directory.
* Add lines that went missing in the rebase+squash