Commit graph

122 commits

Author SHA1 Message Date
Daniel A. Wozniak
9f1647d0f6 Merge branch '3006.x' into merge/3007.x/3006.x 2025-01-29 15:22:23 -07:00
Barney Sowood
9a327c5919 Convert test_custom grains test to pytest
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.
2025-01-17 15:00:54 -07:00
Daniel A. Wozniak
8dd2e3473c Merge branch '3006.x' into merge/3007.x/3006.x 2024-08-26 19:26:17 -07:00
Daniel A. Wozniak
671cdd9313 Migrate grains tests to pytest 2024-08-17 14:35:02 -07:00
Pedro Algarvio
f7570047bd
Merge 3006.x into 3007.x 2024-03-14 13:06:00 +00:00
Shane Lee
176ccd63e3 Fix issue with refresh_db on Windows
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.
2024-03-11 17:56:59 +00:00
Daniel A. Wozniak
6f5c0ac2e7 Revert test changes and fix original tests 2023-12-28 16:42:39 -07:00
Pedro Algarvio
519666b0cf Set cgroupns to host to fix the libvirt migration tests.
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>
2023-09-24 22:10:53 +01:00
MKLeb
ed299d9d70 Move the service module and state integration tests to be functional tests 2023-07-20 15:16:09 +01:00
MKLeb
cb4f1be42e Migrate the service module integration tests to pytest 2023-07-20 15:16:09 +01:00
MKLeb
bba34f1963 Migrate the old service state tests to pytest 2023-07-20 15:16:09 +01:00
Pedro Algarvio
93f06bbb2a Remaining test fixes regarding the recent GitHub RSA key change
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-03-27 18:01:10 +00:00
Pedro Algarvio
681d37fa8d Migrate integration.states.test_file to functional tests
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.
2022-12-02 11:19:30 +00:00
Megan Wilhite
b7a9497614
Merge pull request #62510 from s0undt3ch/hotfix/payload
Remove skip added on `freeze`. A litle refactor and timeouts relax.
2022-09-22 13:06:00 -06:00
MKLeb
3cd2d1c39e move matchers unit tests to pytest 2022-09-21 11:35:34 -06:00
Thomas Phipps
37ad4fac35
Merge branch 'master' into hotfix/payload 2022-09-15 14:40:48 -07:00
Caleb Beard
7e161354dd
Merge branch 'master' into pytest/cache-unit-tests 2022-09-11 23:29:35 -04:00
Pedro Algarvio
8c56caec7b Migrate tests/integration/ssh/test_jinja_filters.py to pytest
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-28 10:27:00 +01:00
Pedro Algarvio
b767b52b16 Migrate tests/integration/modules/test_state_jinja_filters.py to functional
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-26 11:40:34 -07:00
Pedro Algarvio
4ebb9c41d4 Migrate tests/integration/ssh/test_deploy.py to pytest
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-26 11:39:54 -07:00
Pedro Algarvio
3d4dc9f274 Migrate tests/integration/ssh/test_master.py to pytest
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-26 11:39:26 -07:00
Pedro Algarvio
5160ea4284 Migrate tests/integration/ssh/test_mine.py to pytest
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-26 15:42:35 +01:00
Pedro Algarvio
e5b8bac199 Migrate tests/integration/ssh/test_raw.py to pytest
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-25 20:35:38 -07:00
MKLeb
01d18c449d
move remaining cache unit tests to pytest 2022-08-25 13:13:48 -04:00
Pedro Algarvio
49c210f70b Migrate tests/integration/states/test_docker_network.py to functional
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-23 12:50:32 -06:00
Pedro Algarvio
458ab605ed
Move tests into their proper transport. Relax timeouts on the IPC tests.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-23 07:11:55 +01:00
Pedro Algarvio
81d3112046 Migrate mysql execution and state tests to functional tests.
-----

As an added bonus, running mysql module integration tests:
```
=== 195 passed, 2 warnings in 2067.57s (0:34:27) ===
```
as functional tests:
```
=== 195 passed, 5 warnings in 222.23s (0:03:42) ===
```

-----

As an added bonus, running mysql state integration tests:
```
=== 62 passed, 3 skipped, 2 warnings in 576.79s (0:09:36) ===
```
as functional tests:
```
=== 62 passed, 3 skipped, 5 warnings in 253.27s (0:04:13) ===
```

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-07-05 08:14:31 -07:00
Pedro Algarvio
97afb78694 Stop loading imported functions.
Fixes #62190

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-06-29 07:39:30 -06:00
Pedro Algarvio
44ffb72840 Factor out sum and sorting of permissions into separate functions.
Fixes #56495

Additionally, the same logic was applied to the rest_cherrypy netapi
2022-06-15 12:28:06 -06:00
Pedro Algarvio
e33074231b Fix wildcard eauth.
Migrate ``tests/integration/client/test_runner.py`` and ``tests/integration/wheel/`` to PyTest
2022-06-13 13:14:51 -06:00
Pedro Algarvio
e931632b23 Migrate `tests/integration/netapi/test_client.py` to Pytest 2022-06-13 13:14:51 -06:00
Pedro Algarvio
7c905ac7b0 Migrate `rest_cherrypy` tests to pytest 2022-06-13 13:14:51 -06:00
Pedro Algarvio
044007145b Migrate `rest_tornado` tests to PyTest(those possible) 2022-06-13 13:14:51 -06:00
Pedro Algarvio
5bfbc6d60e Switch cache functional tests to the new container support code in salt-factories
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>
2022-06-02 07:05:09 -06:00
Twangboy
d1bb1bf358 Update filename_map 2022-04-19 16:44:43 -07:00
Pedro Algarvio
8ea83784ac Move deferred handler tests to pytest
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-04-12 09:46:02 -04:00
Pedro Algarvio
a9d5e75b52 Add the new refactored salt logging.
It also handles multiprocessing logging.
2022-04-12 09:46:02 -04:00
Pedro Algarvio
cedccff8c7 Migrate `tests.integration.states.test_pkgrepo` to functional tests.
Additionally, for Debian based distributions, test ``pkgrepo`` with the
system ``aptsources`` package and without it.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-04-11 15:02:54 -04:00
Pedro Algarvio
676e3c061e Be sure to import the required fixtures 2022-03-17 14:08:04 -07:00
Daniel A. Wozniak
f6ca55a2d7 Fix multimaster tests when using zeromq transport 2022-02-10 15:58:02 -08:00
Twangboy
a35b29b265 Add some funtional tests
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
2022-01-21 13:04:02 -05:00
Daniel A. Wozniak
9db1af7147 Clean up transports 2022-01-12 21:54:04 -08:00
MKLeb
2e9242c353 remap filename_map.yml for new file exec module tests 2021-12-13 08:45:27 -05:00
Megan Wilhite
a2ba9b9c40 Add test and migrate spm test to pytest 2021-12-08 09:19:26 -05:00
Gareth J. Greenaway
cbabd4b008
Moving tests/integration/states/test_pkg.py to pytest (#61025)
* 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.
2021-11-02 14:14:07 -04:00
Gareth J. Greenaway
5f0659c510 Moving tests/integration/modules/test_pkg.py to tests/pytests/functional/states/test_pkg.py 2021-10-13 14:10:23 -04:00
Gareth J. Greenaway
b9fef5dbd2
Fixing various functions in the file state module that use user.info (#60502)
* 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.
2021-08-24 11:43:50 -04:00
Pedro Algarvio
3c2cd16e70 Remove tests now that we properly check ALL module's docstrings.
Refs #58537
2021-08-19 07:31:52 -04:00
Daniel A. Wozniak
e065dd6733 Refactor loader into subdirectory 2021-07-28 17:47:23 -07:00
Pedro Algarvio
23123e5baa Migrate `tests/integration/states/test_user.py` to Pytest functional tests 2021-07-20 07:12:00 -04:00