When running the test suite it chunks, specially when running against
the changed files, some of the test groups might not collect any test
and Jenkins does not help with getting the exit code from scripts.
This is where ``pytest-custom-exit-code` comes in, it allows exiting
with a 0 exit code when no tests are collected.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
* add etcd3-py to CI requirements for python_version >= 3.6
* Add intial etcd3 implementation and adjust the functional tests
* adjust etcd test suite to test new v3 impl where applicable
* pre-commit fun
* add documentation for new option
* change warnings per suggestions
* change names for backwards compatibility and add back profile kwarg
* pre-commit and lint fixes
* switch docker logic in etcd sdb integration tests
* fix sdb etcd tests v2
* add ls pseudo-functionality to etcd api v3
* move towards recursive kwarg deprecation by adding recurse kwarg as preferred
* add encoding feature and other etcd client args for v3
* precommit
* add deprecations changelog and deprecate waitIndex/index kwargs in favor of start_revision
* pre-commit and revert etcd sdb tests to master version
* remove unused import
* fix mod_watch disbatching
* Make sure to warn if no profile is given and we have a possible connection error
* precommit
* Fix test failures with wrong profile
* Fix v3 -> no v2 error
Previously, when the API was v3-only, but the profile wasn't present
leading to the v2 fallback, it would 404 in certain circumstances.
We can't use a more particular exception in the `_etcd_action` because
the salt loader plays havoc with things.
Co-authored-by: Wayne Werner <wwerner@vmware.com>
Co-authored-by: Gareth J. Greenaway <gareth@saltstack.com>
* create a yamllint utils module. as well as a yaml module that will
eventually be yaml tools to help in troubleshooting yaml
functionality.
* included unit tests for the yaml module. also not happy about moving
from __salt__.module.function to __salt__["module.function"] for the
test to work
* added pre_render test and minor correct to heredoc in yamllint
* changelog
* fix tests running in py3.5, also try and fix pre-commit.
* attempt to fix pre-commit
* still trying to fix pre-commit.
* forgot freebsd, added yamllint to freebsd
* update adding versionadded and depends
* fix pre-commit?
* fix pre-commit
* attempt to fix pre-commit again
Co-authored-by: Megan Wilhite <mwilhite@vmware.com>
* Update pytest to 6.2.5 for python 3.10
* bump junos-eznc to 2.6.0
* bump setproctitle version and fix integration tests
* Skip tests for python 3.10
* Fix test with py3.10
* bump jinja2 version and dependencies
* Fix test with py3.10
* Skip tests for python 3.10 and new moto version
* Use tempfile library to test perms on directories
* Maintain static requirements changes, revert `requirements/base.txt`
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
Co-authored-by: Megan Wilhite <mwilhite@vmware.com>
Co-authored-by: Pedro Algarvio <palgarvio@vmware.com>
GHSA-p5w8-wqhj-9hhf (high severity)
Vulnerable versions: >= 0.4.0, < 0.4.2
Patched version: 0.4.2
Impact
The formatter function that strips comments from a SQL contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service). The regular expression may cause exponential backtracking on strings containing many repetitions of '\r\n' in SQL comments.
Use use the packaging requirements as version constraints to all other
requirements files which should include Salt's base requirements.
The nox sessions now don't install the base requirements since the "top"
requirements file includes the base requirements.
All of this, ensuring that the same versions are used on all of them.
* 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