The changes made in #38793 changes the "get_all_ointerfaces" call
to be a list of DNS servers. This change adjusts the tests structure
from a string to a list and fixes the test failure.
* Don't abort pillar.get with merge=True if default is None
This prevents a SaltInvocationError from being raised if the default is
loaded from a import_yaml jinja macro and the file being loaded is empty
(which is an entirely valid use case). In these cases, the loaded
default would be None, which we don't want to cause an exception.
* Add test case for issue 39062
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.
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
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.
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.