Commit graph

62 commits

Author SHA1 Message Date
Pedro Algarvio
7f98810ea6
Merge 3006.x into 3007.x 2024-03-28 13:50:44 +00:00
Pedro Algarvio
6fb74a0d1a
Reap child processes after each of the ssh tests in case of timeouts 2024-03-27 18:44:44 +00:00
Shane Lee
87d3344a7a Fix failing package tests 2024-03-26 19:49:35 +00:00
Pedro Algarvio
b7630f3b08
Merge 3006.x into 3007.x 2024-02-29 14:25:24 +00:00
Pedro Algarvio
f4549113b1
Update pre-commit hook versions 2024-02-29 12:30:49 +00:00
Pedro Algarvio
03ad4c6337 Update code to be Py3.7+ to reduce merge forward conflicts 2024-02-29 10:16:58 +00:00
Pedro Algarvio
3dea2eb541 Update pre-commit hook versions 2024-02-29 10:16:58 +00:00
Pedro Algarvio
b9be2dec1b Update and remove obsolete pylint plugins 2024-02-27 08:07:04 +00:00
Pedro Algarvio
e3ba31dc7a
Merge 3006.x into 3007.x 2023-12-14 11:32:20 +00:00
Pedro Algarvio
fd563dcba5 Remove some duplicate fixtures
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-12-12 15:29:41 -07:00
Pedro Algarvio
8f9405cf8e Move download_file helpers to tests/support/pytest/helpers.py
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-08-30 12:41:10 +01:00
Pedro Algarvio
c668dcaf5c The minimum PyTest version is now >= 7.0
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-12-06 06:03:10 +00:00
Pedro Algarvio
1882be04ed change_cwd is not a pytest helper function
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-12-02 11:19:30 +00:00
Pedro Algarvio
e4c8839cd2 Add group support to the create_account pytest helper 2022-12-02 11:19:30 +00:00
nicholasmhughes
59ccd7e4d9 fix tests that don't use gid for groups 2022-08-08 13:25:51 -06:00
nicholasmhughes
430fc0b692 fix setting non-unique gid and tests 2022-08-08 13:25:51 -06:00
nicholasmhughes
0dd0ca60a2 handle gid default differently 2022-08-08 13:25:51 -06:00
nicholasmhughes
b452ed5663 support creating groups with non-unique GIDs for testing purposes 2022-08-08 13:25:51 -06:00
nicholasmhughes
eaa004dd64 fixes saltstack/salt#62377 groups with duplicate GIDs are not returned by get_group_list 2022-08-08 13:25:51 -06:00
Pedro Algarvio
b35e7d46dc Format source code using latest black
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-01 12:49:16 -06:00
Pedro Algarvio
4d49013247 Update to isort 5.10.1
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-01 12:49:16 -06:00
MKLeb
a61362a73d account for newer entropy poolsize in EntropyGenerator 2022-06-30 11:02:16 -06:00
Pedro Algarvio
ea0e89c010 Be sure do delete groups matching the username when deleting the account.
The reason for this extra step is to support the multiple platforms
behavior and because we remove the user from it's primary group before
deleting the account.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-06-15 12:28:06 -06:00
Pedro Algarvio
74a8b7ab3a Set the account password, even if reusing existing temporary accounts. 2022-06-13 13:14:51 -06:00
Pedro Algarvio
af2964f4dd Implement `pytest.mark.requires_random_entropy` marker for simpler usage.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-06-10 07:24:00 -06:00
Pedro Algarvio
096ea64485 Turn entropy generation into a helper
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-03-28 08:49:54 +01:00
Pedro Algarvio
978e1af50f Reduce proxy minions fixture scope.
* Make sure to also delete the dummy delta proxy minions keys
* Use ``salt_master.{pillar,state}_tree`` instead of direct use of the ``temp_file`` helper.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-03-01 14:38:37 -08:00
Pedro Algarvio
f4cef93a14 Don't inject salt extensions utils into __utils__ 2021-08-27 07:21:24 -04:00
Pedro Algarvio
78788b4dab
Remove temporary `StateReturnAsserts` class (#60737)
* Pin to ``pip>=20.2.4,<21.2`` on the created virtualenvs

* Use the static requirements when installing salt into the virtualenv

This should fix the freebsd failures

* ``SaltVirtualEnv`` will always use ``USE_STATIC_REQUIREMENTS=1``

* Update to ``pytest-salt-factories==0.907.x``

* Remove the temporary ``StateReturnAsserts`` class.

In the process, a few functions from the ``state`` module are now
wrapped to allow a more pythonic assertion against it's returns through
``StateReturn``.
We also introduce ``MultiStateReturn`` for full state runs.

* Update tests that relied on ``StateReturnAsserts`` or it's pytest helper function
2021-08-16 13:03:57 -04:00
Pedro Algarvio
76e50885b0 Fix strings 2021-08-06 13:09:47 -07:00
Pedro Algarvio
b245ce5840 Additional fixes for windows 2021-07-26 06:52:56 -04:00
Pedro Algarvio
c35e0bbf89 Windows has a minimum length for account passwords 2021-07-26 06:52:56 -04:00
Pedro Algarvio
e8fc7d5c99 Make the created group the primary group for the new account 2021-07-21 15:36:10 -07:00
Pedro Algarvio
30682c0e6e Creating a group when creating an account is again, optional 2021-07-21 15:36:10 -07:00
Pedro Algarvio
343aa4c321 Both windows and macos use plain text passwords 2021-07-21 15:36:10 -07:00
Pedro Algarvio
3a077ac20c Add a `create_group` pytest helper 2021-07-20 07:12:00 -04:00
Pedro Algarvio
4ed8a96c9b Don't fail if the account already exists, nor when problems occur deleting it 2021-07-20 07:12:00 -04:00
Pedro Algarvio
48c6537370 Add `TestAccount.user_info` property 2021-07-20 07:12:00 -04:00
Pedro Algarvio
89c9f9bc1d Add group support to the create_account pytest helper 2021-07-20 07:12:00 -04:00
Pedro Algarvio
1afa3565ce No string formatting in log calls 2021-07-13 11:10:20 -04:00
Pedro Algarvio
aef8fdc3d3 Bump to pytest-salt-factories >= 0.903.x 2021-05-28 14:48:59 -07:00
Pedro Algarvio
ed650b4569 Add back support to load old entrypoints by iterating instead of type checking
Fixes #59961
2021-05-13 12:50:29 -04:00
Pedro Algarvio
dfa0619b9e Replace saltstack.com with saltproject.io on URLs being tested 2021-05-05 06:48:41 -07:00
Pedro Algarvio
25605e36aa Add tests for the loader entry points changes 2021-03-05 07:32:14 -05:00
Pedro Algarvio
d8ffb0a454 Include salt extensions in the versions report
Fixes #58938
2021-03-05 07:32:14 -05:00
Pedro Algarvio
9d9cabd97d Remove any created subdirectories when cleaning up 2021-02-18 16:32:27 +00:00
Gareth J. Greenaway
15cfbc9c84 swapping str for building a string. Removing unused pytest helper. removing skipIf for pytest. 2021-02-02 07:39:08 -05:00
Gareth J. Greenaway
0e5cd6e52f Fixing various tests that test the state system. Adding temp_state_directory helper for when we want to add a temporary state into a directory in the Salt root. 2021-02-02 07:39:08 -05:00
Pedro Algarvio
87019146af We no longer need the distinction between running under PyTest or not 2021-01-29 13:55:52 -05:00
Pedro Algarvio
89e65f98be Migrate integration.modules.test_state to PyTest 2021-01-19 18:44:30 +00:00