Merge pull request #35662 from rallytime/merge-2016.3

[2016.3] Merge forward from 2015.8 to 2016.3
This commit is contained in:
Nicole Thomas 2016-08-22 13:03:43 -06:00 committed by GitHub
commit 9fe0972761
4 changed files with 30 additions and 2 deletions

View file

@ -354,8 +354,8 @@ Set the default outputter used by the salt command.
Default: None
# Set the default output file used by the salt command. Default is to output
# to the CLI and not to a file. Functions the same way as the "--out-file"
Set the default output file used by the salt command. Default is to output
to the CLI and not to a file. Functions the same way as the "--out-file"
CLI option, only sets this to a single file for all salt commands.
.. code-block:: yaml

View file

@ -17,6 +17,9 @@ Total Merges: **57**
Changes:
- **PR** `#35611`_: (rallytime*) Everything in the sample master config file should be commented out
- **PR** `#35569`_: (*rallytime) Write test for multiple unless commands where 1st cmd passes and 2nd fails
- **PR** `#35600`_: (*rallytime) Update release notes for 2015.8.12
- **PR** `#35599`_: (*rallytime*) Update release notes for 2015.8.12
- **PR** `#35584`_: (*terminalmage*) Update linux_sysctl tests to reflect new context key
- **PR** `#35575`_: (*terminalmage*) Add warning about AWS flagging of nmap usage
@ -248,10 +251,13 @@ Changes:
.. _`#35545`: https://github.com/saltstack/salt/pull/35545
.. _`#35546`: https://github.com/saltstack/salt/pull/35546
.. _`#35566`: https://github.com/saltstack/salt/pull/35566
.. _`#35569`: https://github.com/saltstack/salt/pull/35569
.. _`#35575`: https://github.com/saltstack/salt/pull/35575
.. _`#35577`: https://github.com/saltstack/salt/pull/35577
.. _`#35584`: https://github.com/saltstack/salt/pull/35584
.. _`#35599`: https://github.com/saltstack/salt/pull/35599
.. _`#35600`: https://github.com/saltstack/salt/pull/35600
.. _`#35611`: https://github.com/saltstack/salt/pull/35611
.. _`bp-25276`: https://github.com/saltstack/salt/pull/25276
.. _`bp-28521`: https://github.com/saltstack/salt/pull/28521
.. _`bp-33875`: https://github.com/saltstack/salt/pull/33875

View file

@ -0,0 +1,6 @@
cmd_run_unless_multiple:
cmd.run:
- name: echo "hello"
- unless:
- /bin/true
- /bin/false

View file

@ -87,6 +87,22 @@ class CMDTest(integration.ModuleCase,
os.remove(state_file)
os.remove(unless_file)
def test_run_unless_multiple_cmds(self):
'''
test cmd.run using multiple unless options where the first cmd in the
list will pass, but the second will fail. This tests the fix for issue
#35384. (The fix is in PR #35545.)
'''
sls = self.run_function('state.sls', mods='issue-35384')
self.assertSaltTrueReturn(sls)
# We must assert against the comment here to make sure the comment reads that the
# command "echo "hello"" was run. This ensures that we made it to the last unless
# command in the state. If the comment reads "unless execution succeeded", or similar,
# then the unless state run bailed out after the first unless command succeeded,
# which is the bug we're regression testing for.
self.assertEqual(sls['cmd_|-cmd_run_unless_multiple_|-echo "hello"_|-run']['comment'],
'Command "echo "hello"" run')
def test_run_creates_exists(self):
'''
test cmd.run creates already there