Added docs to the release notes for all of these changes.
The affected modules are:
- htpasswd
- img
- smartos_virt
- virt
- virtualenc_mod
- xapi
- zypper
The 16.0.0 version of pyOpenSSL has an upstream error in it that
causes a stacktrace in our test suite. The upstream issue has
been fixed in pyOpenSSL in 16.1.0 and upwards, but 16.0.0 is still
available.
This fix skips the test when the specific error generated by the
upstream bug is encountered during the test.
Tests were failing because _parse_interfaces is returning the correct data per mocked data. The assertion was expecting the iface line to have been stripped.
sleep sometimes is found in /bin/sleep, like in ubuntu. We should just
depend on the PATH variable being correct, and finding sleep, instead of
explicitly saying /usr/bin/sleep
commit d5003a44230f7bb6878057023726ba7135c9909c
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Fri Nov 11 10:22:21 2016 -0700
Revising cron state & module for OS agnostic support of cron when running as non-root
commit c9c20fc34670e1b371c505d8b7959ea00ae0a36e
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Thu Nov 10 15:47:04 2016 -0700
Re-adding removed comment
commit 4058bf3f609aeec11e0ff2a91191eba16556abf0
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Mon Nov 7 11:08:20 2016 -0700
Adding user to error message and fixing key error if there is no updates
commit 768e28e43585451a241979d048d5ac704f4f8f60
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Fri Nov 4 23:24:13 2016 -0700
Added try/except on group identification and refactored success messaging
commit d575189b17c1b75ef6d43b9ca821fb66aa142531
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Fri Nov 4 23:23:38 2016 -0700
Added try/except on group identification and refactored success messaging
commit 13a8207e5bc99044a3dfca4412e34ba9884d44a8
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Fri Nov 4 17:21:18 2016 -0700
Resolving group permissions issues when managing non-root crontabs
commit 89a7d1e04f21f1cbd93b83052cf47ba7a7225d72
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Fri Nov 4 12:32:55 2016 -0700
Adding unit tests for OS specific cron command string rules
commit b2a00009fda987474c40cee3f2ed8affe5f07f5b
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Wed Nov 2 09:10:06 2016 -0700
Fixing cron.file when running as non-root
commit ba27b18b01f304e541af8b6c7107596f34651123
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date: Fri Oct 28 10:58:03 2016 -0700
Removed OS specific logic to always run crontab commands as owner of cron
This test connects to random.org, which may throws the following error
on one network I manage:
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Other errors are possible, such as `socket.error`. Since it is
difficult to anticipate the failure mode, skip these tests if https
communication provokes any exception.
Also, this is not a unit test--it's more of a system test. My
recommendation that we recategorize this as an integration test where
global IPv4 routing can more reasonably expected.
Add skipIf pyvmomi is not installed
NameError: global name 'vmodl' is not defined
NameError: global name 'vim' is not defined
Fix skipIf typo for OpenBSD
>>> import sys
>>> sys.platform
'openbsd6'
Avoid warning from glusterfs.py:
Use specific 'len(elem)' or 'elem is not None' test
Enable boto_secgroup_test tests that work now:
test skipped due to error in moto return - fixed in
cc01669643
* [PY3] Change log.warn statements to log.warning
log.warn is deprecated in Python 3. This change removes the
occurance of deprecation warnings for using log.warn. For example:
```
17:24:23 [WARNING ] /testing/salt/utils/verify.py:522: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
17:24:23 log.warn('Insecure logging configuration detected! Sensitive data may be logged.')
17:24:23
17:24:23 [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
```
* Tweak unit.utils.verify_test to using warning instead of warn
That function's namespace looks like this:
```
def create_internet_gateway(self, dry_run=False):
```
So when we pass in the vpc_id opbject in the test, the check later
in the function sets `dry_run=True` since the vpc_id opbject exists.
This later throws JSONResponseErrors because the `DryRun` flag is
set. This error raising functionality was added in the most recent
version of moto, which exposed this bug.
This fixes the three boto_vpc_test unit state tests. We'll see if
other tests need to be addressed in other files on a full test run.
These tests now not only test the new functionality added for matching
on source URI and source_hash_name, but also test non-specific hash_type
lookups, specific hash_type lookups, and failed specific hash_type
lookups (i.e. requesting a hash type not present in the file).
Here is the stack trace that happens when running file.line with
mode=replace on a file that exists, but is empty, as described in
the bug report:
unit.modules.file_test.FileModuleTestCase.test_replace_line_in_empty_file .................................................
Traceback (most recent call last):
File "/root/SaltStack/salt/tests/unit/modules/file_test.py", line 593, in test_replace_line_in_empty_file
mode='replace'))
File "/root/SaltStack/salt/salt/modules/file.py", line 1523, in line
for line in body.split(os.linesep)])
TypeError: expected a character buffer object
* status.uptime - avoid nawks srand, causes problems on smartos
* status.uptime - remove docs comment that no longer applies
* status.uptime - optimize a tiny it and get rid of the need for a shell
* status.uptime - actually remove the now redudent line too
* status.uptime - readded fallback to uptime binary, atleast we get something on the BSDs too now
* status.uptime - support python pre 2.7 as per damon-atkins
* status.uptime - want OpenBSD support
* status.uptime - want freebsd support, removed fallback once again so we are consistant
* status.uptime - want NetBSD support
* status.uptime - fold @jfindlay work for OSX into mine, tweak mine based on his work
* status.uptime - push tests from @jfindlay with updates SunOS test
* status.uptime - remove cmd.run_all as it was replaced by sysctl.get
* status.uptime - attempt to fix sunos test
* Figured out why there was a cmd.run mock was there.
* add note for SunOS, so we do not forget
* Update version added tag
This fixes a number of annoyances with the archive.extracted state.
Rather than re-state the changes again here, they can be observed in the
carbon release notes, where they have been documented.
Some tests use position number in the argument list of psql command
to check their results. As #36787 add one element, next position
in the list must be used.
This will handle the case of RHEL 7.3, which maintains an older version
of systemd with the retcode/output changes from "systemctl status" in
systemd 231 backported.
We have a couple of tests using the "assert_called_once" function, however, our salt-jenkins
states pin the version of mock at 1.0.1 (This is the last version that is compatible with
Python 2.6). We either need to use something else that works for all versions of mock or gate
the test.
In the pacman tests, it is possible to use "assert_called_with" instead of "assert_called_once"
In the dimension_data and gce unit tests, we need to gate the assertion behind a mock version check.
This way the tests won't fail if the version of mock installed is less than 2.0.0.
This update allows granting privileges on ALL tables or ALL sequences
in a given schema. Such as:
GRANT SELECT ON ALL TABLES IN SCHEMA public TO 'monkey';
* Quote postgres privilege target names
Postgres lets you put characters in table/database names which you then must
quote. So we should always quote.
* Updating unit tests
* Also quote role names.
Role names can also have dashes (or others) in them, so we must also quote
them.
The blockdev module is being slowly deprecated and its functions moved to
to the disk module instead. There is a test for resize2fs in the blockdev_test
file in the 2015.8 branch (which matches the resize2fs function in the blockdev
module), but this function was moved to the disk file in 2016.3. The test was
never moved over.
I discovered this during a merge forward in #36344. This PR adds the
test from 2015.8 blockdev_test to the 2016.3 disk_test.py, and is adjusted
to work with the disk module accordingly.
Support OpenBSD branch specification (%)
ruby%2.3
As well as flavor specification (--)
vim--gtk2
By default packages are installed using the base flavor and the stable
branch.
Also add unit tests for OpenBSD package management
When parallels creates linked clones, it generates a new snapshot on the
cloned VM with the name 'Snapshot for linked clone', which when used
with jenkins results in hundreds of unneeded snapshots per week.
* Fixing skipped boto tests to prevent errors if boto3 does not exists.
* Fix tests to prevent errors when libcloud is not present
* Fix PortageConfigTestCase in case of portage is not present
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
Otherwise we are not properly mocking this function call and the
tests fail when the `_conn3` function is called. (Any distro using
salt.utils.boto3 will fail here.)
We also need to protect the test class if the correct versions of
boto and moto are not installed on the test system.
* Change osmajorrelease back to str in test_useradd
* Change osmajorrelease back to str in test_userdel
* Change osmajorrelease back to str in test_members
* Openstack keystone V3 API support in keystone modules.
* Python3 compatibility unicode to six.text_type
* Return values of tests: test_user_absent, test_endpoint_absent,
test_role_absent, test_service_absent, test_tenant_absent
* Fixed tests states.test_role_present and states.service_present
* Fixed module tests (not all)
* These are the old tests and need to be rewritten anyway
* fix pylint error
* fix keystone state tests
* Make python3 and python26 happy
* Don't need both ways of nesting with statements
* No longer need pylint disable
* Lint fix
* take out the correct import
- The previous implementation was limited to the 15 char limit for "Computernames" which would cause the state to always fail if the hostname was longer
* Don't test for linux shells on Windows
* Don't force windows to be false
Salt didn't used to support runas on Windows.
Salt now supports runas on Windows. This line was causing the wrong code
paths to be followed.
* Skip test on windows because no VT on windows
* add missing closing paren
Also load the __utils__ into pillar and fileserver and fileclient so
that this function can be used there with __opts__.
Also sets the default for s3 to 'us-east-1' like it is documented.
Closes#30976Closes#28913
* This test was doing all sorts of things, raging from simply failing
to driving CPUs to 100%, to leaking memory until the entire test suite crashes.
This seems to happen only in conjunction with running the entire unit test suite
and does not occur on its own
cc: @kraney
* Better method to skip test. This way we can track it.
* Remove the deprecated version of the status.uptime function.
The deprecated version of the function was set to be removed in
Carbon. The Carbon release notes were also updated with this change.
* Remove test_deprecated_uptime unit test
The deprecated version of uptime no longer exists.
* Remove unused import and deprecated uptime reference
to driving CPUs to 100%, to leaking memory until the entire test suite crashes.
This seems to happen only in conjunction with running the entire unit test suite
and does not occur on its own
cc: @kraney