The test that runs these states is testing for behavior that was
obsoleted by virtualenv 13.0. Ensure that we have older virtualenv
available, and then create a venv with that older version. Use the
2nd virtualenv to attempt the "weird" install.
* git.latest: fail gracefully for misconfigured remote repo
When the remote repo's HEAD refers to a nonexistent ref, this was
causing a traceback when we tried to check if the upstream tracking
branch needed to be changed after cloning the repo. This commit fixes
this traceback by gracefully failing the state when the remote HEAD is
not present in the ``git ls-remote`` output, but the desired remote
revision doesn't exist.
Additionally, a similar graceful failure now happens if the state is run
again after we gracefully fail the first time, and we need to set the
tracking branch. Trying to set the tracking branch when there is no
local branch would fail with an ambiguous error like "fatal: branch
'master' does not exist", so before we even attempt to set the tracking
branch, the state is failed with a more descriptive comment.
* Add integration test for #36242
See https://github.com/saltstack/salt/issues/34790#issuecomment-238857462
This should help people understand the new behavior of the branch
parameter, when they run into non-fast-forward failures in git.latest
states when the remote rev differs from the name of the local branch.
Implementation of https://github.com/saltstack/salt/issues/34725 caused
these cases to be seen as non-fast-forward changes, requiring
force_reset=True to proceed. This resolves that unintended behavior.
Fixes#36321.
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.