* Check rendered YAML for invalid keys
PyYAML will for some reason allow improper YAML, specifically double
curly-braces like ``{{ }}``, to be formed into an unhashable dict (that
is, one with a dict as a key). This commit will change the YAML renderer
such that the rendered data is recursively checked for keys that are
dicts, and raises an SaltRenderError if such a key is encountered.
Resolves#33073.
* Fix smtp returner test
This test was using jinja placeholders but was not passing the template
through the jinja renderer. This commit adds the use of the jinja
renderer to this test to fix the failure caused by the addition of
verification of the loaded YAML inthe previous commit.
fixing lint issues
moving the get_options function into a utils.py under returners. previous attempt at using a call to the salt config module doesn't work if the returner is called from the scheduler.
adding missing docstring
Unit tests were failing for SMTP returner because __opts__ was not available. Ensuring it's available, empty, if it doesn't already exist.
removing the check and population with an empty dict for __salt__ and __opts__. Adding an empty __opts__ to the smtp returner unit tests.
Thanks to @rallytime for pointing out that several unit tests
were not working correctly when run locally.
I have fixed the perm_test to no longer use relative paths. I have
also disabled this tests since, at some point at least, perms changed
to be 0664 instead of 0644 in a number of places. This warrents further
discussion.
I have fixed pydsl_test to no longer throw errors to stdout about
missing SLS files. (Yay!!)
I have fixed the smtp_return tests so that it will without errors
on hosts with gnupg installed.