* Add git.diff function
* Fail git.latest states with uncommitted changes when force_reset=False
Also, discard these changes when running the state if force_reset=True.
* Add integration test for case where there are uncommitted changes
This test uses ``pkg.list_upgrades`` to find a package which it assumes is
installed, to test ``pkg.installed`` with ``only_upgrade=True``. The
problem with that approach is that ``pkg.list_upgrades`` uses a dry-run
of an ``apt-get dist-upgrade`` to find the upgrades. On non-LTS Ubuntu
releases, a ``dist-upgrade`` results in upgrading to an entirely new
Ubuntu release, and new packages which would be installed by the
dist-upgrade (but are not currently installed) will be included in the
return data. This causes the test to fail when we attempt to run
``pkg.latest`` with ``only_upgrade=True`` on a package which is not
already installed.
This commit fixes the test by ensuring that our target package is
already installed, and continuing to iterate through the return data
from ``pkg.list_upgrades`` until a currently-installed package is found.
* Remove redundant usage of destructiveTest decorator
* Remove unnecessary SLS file
This simple state can be run using run_state
* Explicitly order tests
* Use run_state instead of invoking state.sls
* Ensure only one refresh_db done during pkg integration tests
* Add pkg.latest test for package without an epoch
* Optimize pkg.latest_version usage in pkg integration tests
* Clarify outcome when only_upgrade is used
* Add pkg.latest test with only_upgrade=True
This was commented out for reasons having nothing to do with anything
else going on in 0c069dd. Uncommenting this sanity check so that we are
notified if we need to update our targets in the future.
* Fix file.managed for Windows (#33181)
* Revert back to import string_types
For some reason, there is a problem with the following
code when run from the file.py module:
```
from salt.ext import six
comment = 'This is a string'
isinstance(comment, six.string_types)
```
When run from within the python shell it works fine.
* Add six import
* Fix some lint
* Use correct six import
* Changed it back to explicit import
* Additional comments specific to 2015.5
* Fix file.managed for real
* Move comment to clarify purpose
* update 2015.5.11 release notes (#33197)
* Add pip installed and removed test (#33178)
* Resolve issue with pkg module on Mint Linux (#33205)
Closes#32198
* Add run_on_start docs to schedule.rst (#32958)
Fixes#22580
* Backport #33021 manually to 2015.5 (#33044)
* Saltfile with pillar tests (#33045)
* add file.managed with pillar data tests
* do not require git for other tests
* Whitespace...
In order to know which files need to be cleaned up, a file.directory state
looks at its requirements.
Previously, it only looked at the name attribute of the required state and
supposed it was the name of the file to keep within this directory. It's
not completely right, as a requirement can also be made against a state ID,
in which case the 'name' attribute of the required state then have to be
used.
Fix#8646