Prevents zero length error on Python 2.6
Fixes Zypper unit test
Enhances pkg.list_downloaded information of a package
Listing all patches instead of security ones only
Adapting Zypper test to new list_downloaded output
Fixes zypper test error after backporting
Pylint fixes
Adding support for installing patches in Zypper module
Adding list_downloaded function to Zypper module
Adding list_downloaded function to Yum module
Adding new pkg.downloaded state
Adding documentation for pkg.downloaded state
Adding pkg.patched and pkg.patch_downloaded states
Check targets for advisory patches installation
Adds support for listing advisory patches with Zypper
Adds support for listing advisory patches with Yum
Improving function naming
Moving advisory ids checks into pkg_resource.parse_targets
Fixes _find_download_targets to call _preflight_check
Fixes parse_targets when advisory id is passed as name
Pylint fixes
Enables pkg.downloaded to verify packages after package manager call.
Adding missing kwargs parameters to pkg.install call
Adding versionadded flags
Some refactoring and minor fixes
Adding unit tests for Zypper execution module
Adding more unit tests for Zypper module
Pylint fix
Adjust the test so it is using the right grain for SUSE systems
Bugfix: use correct grain constant for platform
Refactor with setup/teardown
Add UT for RedHat's set_zone
Fix doc for RH UT
Remove unnecessary mock patch
Doc fix
Add UT for set_zone on SUSE series
Adjust UT to use correct grain for SUSE series
Bugfix: use correct os_family grain value for SUSE series
Add UT for gentoo on set_zone
Add UT for Debian on set_zone
Remove duplicate code
Add UT for get_hwclock on UTC/localtime
Remove dead code
Add UT for get_hwclock on SUSE platform
Bugfix: use correct grain for SUSE and RedHat platform
Add UT for RedHat/SUSE platforms on get_hwclock
Add UT for Debian on get_hwclock
Add UT on Solaris
Add UT for AIX on get_hwclock
Add UT for set_hwclock on AIX
Fix docstrings
Add UT for set_hwclock on solaris
Add UT for set_hwclock on Arch
Add UT for set_hwclock on RedHat
Fix UT names
Add UT set_hwclock on SUSE
Bugfix: use correct grain name for SUSE platform
Add UT for set_hwclock on Debian
Add UT on set_hw_clock on Gentoo
Fix lint issues
Rewrite test case for using no patch decorators
Disable the test for a while
Do not use multiple variables in "with" statement as of lint issues
- Add fake preferred IP function for testing
- Add initial unit test for openstack cloud module
- Move out nested function to be unit-testable
- Lintfix
- Add unit test for nova connector
- Move out nested function for testing purposes
- Fix name error exception
- Skip test, if libcloud is not around
- Add unit test for node ip filtering
- Lintfix E0602
- Fix UT parameter changes
- Fix lint, typos and readability
- PEP8: fix unused variable
- Reformat idents, fix typos
- Describe debug information
test.support.mock.mock_open specifies a side effect so that if you constantly
read a mocked open call, it will only iterate through it once, and then after
it will appear as if the end of the file has been reached.
This is needed for salt.modules.cp.push to be tested correctly.
The automatic back-porting process did't work for this file since the
testing file has been renamed. I manually added the changes to
`timezone_test.py` that were present in PR #41615.
This new part of the test_exit_status_correct_usage test was added
in PR #41382. This test, along with some memory leakage for the
test running in Python 3, has exposed an underlying issue with
Minion._thread_return subprocessing in the test suite. Due to this
issue, this test is extremely flaky.
Per @DmitryKuzmenko's recomendation in https://github.com/saltstack/salt-jenkins/issues/378,
this test should be commented out for the time being. He is planning
on coming back to this issue to uncomment the test once the underlying
problem has been resolved.
tests.support.helpers passes the single-asterisk tuple of args as
individual arguments to runtest_helpers.modules_available. This breaks
tests which pass more than one argument to the requires_salt_modules
decorator.
This has been fixed by making runtests_helpers.modules_available accept
an arbitrary number of args via using a single-asterisk.
If apache-libcloud 2.0.0 is installed, the workaround outlined in issue #32743
no longer applies and should be avoided. However, we still need to support older
versions of apache-libcloud that need this work-around.
The minimum version required of apache-libcloud has been updated to 2.0.0 in pull
request #40837, which will released in Oxygen. #40837 has removed all of the
work-arounds needed for issue #32743 for 2.0.0. Until Oxygen is released, however,
we need to support both the work-around for older versions of apache-libcloud as
well as 2.0.0.
This is the error
```
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and
data extracted from the cache is guaranteed to be valid. If you want to make
sure everything is consistent, use 'npm cache verify' instead.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command
with --force.
```
After talking to @cro, all of the mac power modules became super flaky in
Sierra. Because of this, I am marking all of the mac power tests with the
flaky decorator.
This allows for the shutdown function to also terminate any orphaned
processes which were spawned during the time between when
terminate_process is invoked, and when the processes are actually
killed.
If this is has any unicode characters in it, it won't load on systems that do
not default to a unicode locale.
find . -type f | while read line; do ret=$(file $line); if [[ $ret == *UTF-8* && $line == *.py ]]; then echo $line; fi; done
The above will list all files that have unicode characters in it and won't load
with locale set to C or POSIX
This fixes the test failures recently observed in
integration.shell.test_master.MasterTest.test_exit_status_correct_usage.
The test failures were not a regression, but rather a symptom of a
greater problem with the TestProgram class' shutdown() func. When
terminating the process using the terminate_process helper from
pytest-salt, it does not pass kill_children, which defaults to False.
This makes the helper only kill the main PID, leaving all the other PIDs
running.
This means that every time the integration suite was being run, each
time the TestProgram class was used to spawn a temporary daemon, it
would leave all the child PIDs running when the shutdown() is invoked.
By passing kill_children=True, we ensure that the child PIDs are also
killed. This should provide a significant perfomance improvement in the
test suite.
tls module: convert bytes to string
gzip util: use BytesIO for 'wb' file
django module: ignore arguments order in assert
pillar module: correctly test pillar merge
This test uses file.accumulated to accumulate data, to be used in the
file.blockreplace state. However, because this data is stored in a
dictionary, the iteration order is different on different versions of
Python. As it is very clearly stated that the accumulator data structure
is a dictionary, rather than modifying the file.accumulated behavior
this commit just updates the test so that it searches for all values
that it should find between the block markers.
This test is checking behavior that seems to have been specific to the
carbon package from PyPI. Since this is a Python 2-only module, and has
deps that do not exist on Python 3, it should not be run on Python 3.
mock = MagicMock(return_value='') works for functions: here mock() will
return the value (empty string). But mock returns the MagicMock object.
Not sure why but it worked in Py2, but in Py3 os.path.join(mock,
'something'), for instance, returns an error.
Fixed the issues by avoiding of using mocks where we can use simple
strings.
This is actual for gnupg 2.1 that requires the agent and starts it
automatically. But since each test creates a new keystore tests become
fail after the first one starts gpg-agent.
This was left over from a merge-forward. The proxy minion testing
pieces could not be completely merged-forward due to large conflicts
in this file. Please see the comment in PR #41113 for more information.