Pedro Algarvio
2702705043
Merge 3006.x into master
2023-09-29 18:15:30 +01:00
jeanluc
f79cee6075
Remove new err msg again. Report state ID, not module
2023-09-27 12:38:48 +00:00
jeanluc
93859b1e6c
Improve error message with multiple string-valued state args
2023-09-27 12:38:48 +00:00
Pedro Algarvio
c07f66261e
Merge 3006.x into master
2023-09-20 15:52:18 +01:00
Megan Wilhite
778009e587
Increase code coverage for salt/state.py
2023-09-18 19:05:30 +01:00
Pedro Algarvio
2e962677b7
Run pyupgrade
against the changes from the merge-forward
...
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-06-29 09:41:56 +01:00
cmcmarrow
a1a414813b
stop double test_labels
2023-06-29 09:09:17 +01:00
Charles McMarrow
8dc6dd61d2
[3006.x] rebase test labels ( #64053 )
...
* changelog
* add actions
* add tools
* typo
* add some debug
* pulls vs push
* fire on pullr only
* test port part 1
* part 2
* part 3
* part 4
* fix double run slow
* clean up
* update types
* reg workflow
* reg workflow
2023-04-15 18:19:58 -07:00
Gareth J. Greenaway
1a2e2c0c98
Initial pass at adding the ability to exclude arguments from a state that end up passed to cmd.retcode when onlyif is used.
2023-04-11 18:24:26 +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
Pedro Algarvio
1b18b4e5ab
Use the minion_opts
and master_opts
fixtures instead.
...
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-11-18 12:36:51 -07:00
Pedro Algarvio
858bcf4b58
Always populate __sls__
, __id__
and name
on state requirements
...
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-11-04 08:18:00 -06:00
Gareth J. Greenaway
d6f0ce57b9
aggregate the requisites first and then aggregate the states.
2022-09-20 13:58:50 -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
Benjamin Drung
fae21e4698
Fix test cases with PermissionError on /var/cache/salt
...
When running the test cases without root permission, some test cases fail:
```
$ python3 -m pytest -ra tests/pytests/unit/state/test_state_compiler.py tests/pytests/unit/test_minion.py
[...]
FAILED tests/pytests/unit/state/test_state_compiler.py::test_render_requisite_require_disabled - PermissionError: [Errno 13] Permission denied: '/var/cache/salt'
FAILED tests/pytests/unit/state/test_state_compiler.py::test_render_requisite_require_in_disabled - PermissionError: [Errno 13] Permission denied: '/var/cache/salt'
FAILED tests/pytests/unit/test_minion.py::test_minion_module_refresh - PermissionError: [Errno 13] Permission denied: '/var/cache/salt'
FAILED tests/pytests/unit/test_minion.py::test_minion_module_refresh_beacons_refresh - PermissionError: [Errno 13] Permission denied: '/var/cache/salt'
```
Fix these test cases by using a temporary directory as cache directory.
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2022-01-06 14:20:18 -05:00
Gareth J. Greenaway
b34399044d
Fixing the state aggregation system to properly handle requisities ( #60604 )
...
* Fixing the state aggregation system to properly handle requisities. Fixing pkg state to exclude packages from aggregation if the hold attribute is in the state. Moving tests/unit/test_state.py to pytest.
* Removing last bits of non-pytest testing code.
* Adding changelog.
* removing debugging.
* requested changes.
* correct way to combine two frozensets.
Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>
2021-08-12 14:38:23 -04:00