Converts the test_custom grains test from an old style test to a pytest
test. This is just to make it easier for me to debug why it is failing
and needs to be done at some point anyway.
When a new package definition file was added to the repo you had to run
refresh_db twice to get it to show up in the package databse. This
clears the cache before refreshing the database to force changes.
This needs a newer version of the python docker package.
The breakage was due to updating the docker container used. - https://github.com/saltstack/salt-ci-containers/pull/42
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
In the process, split the tests into sub-modules which target each
function tested from the ``file`` state modules.
A lot of text files used during testing, which can be created at runtime
were also deleted.
Additionally, split the tests into their own modules and clean up unused, or
no longer necessary code.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
Additionally, for Debian based distributions, test ``pkgrepo`` with the
system ``aptsources`` package and without it.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
Add functional tests for the following:
- file.readlink
- file.replace
- file.symlink
Remove unit tests for file.replace as they are duplicated in the added
functional test
* Moving tests/integration/states/test_pkg.py to tests/pytests/functional/states/test_pkg.py
* Fixing failing tests.
* fixing test_pkg_011_latest_only_upgrade
* Fixing failing test when the test is skipped.
* Adding needed decorators to tests via the pytestmark.
* Fixing various functions in the file state module that use user.info to get group information, certain hosts particularly proxy minions do not have the user.info function avaiable. In those cases we fall back to using the username for the group name. Also moving the existing file state module unit tests over to pytest and breaking them out into seperate files for easier management.
* Adding changelog.
* Fixing the failing tests for test_hardlink. We want to make sure that user.info is not in __salt__ so the changed logic takes effect.
* Skip the selinux tests unless running on Linux.
* Add a reason for the skip.
* Get results of file.check_perms into different variable then check result in that dictionary if the check_perms failed. Update tests to mock file.check_perms with more accurate return.
* check_perms in file module returns objects while the file module for windows returns one. Updating changes and tests
* Mock return from file.check_perms depending on the platform we are running tests on.
* requested changes. round one.
* requested changes. round two.
* requested changes. round three.
* black changes.
* Converting things over to pytest.