Skip to content

Commit

Permalink
fix gtfs ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcmarrow committed Aug 30, 2023
1 parent e2d43b0 commit da149d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion salt/utils/gitfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def __init__(
key_cb=str,
val_cb=lambda x, y: str(y),
)
self.ssl_verify = self.opts.get(f"{self.role}_ssl_verify", None)
self.conf = copy.deepcopy(per_remote_defaults)
# Remove the 'salt://' from the beginning of any globally-defined
# per-saltenv mountpoints
Expand Down Expand Up @@ -823,7 +824,7 @@ def enforce_git_config(self):
desired_refspecs,
)
if refspecs != desired_refspecs:
conf.set_multivar(remote_section, "fetch", self.refspecs)
conf.set_multivar(remote_section, "fetch", desired_refspecs)
log.debug(
"Refspecs for %s remote '%s' set to %s",
self.role,
Expand Down Expand Up @@ -856,6 +857,7 @@ def enforce_git_config(self):
self.id,
desired_ssl_verify,
)
self._ssl_verfiy = self.opts.get(f"{self.role}_ssl_verify", None)
conf_changed = True

# Write changes, if necessary
Expand Down
12 changes: 6 additions & 6 deletions tests/pytests/functional/utils/test_gifts.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ def _test_gitfs_simple(gitfs_opts):
g = GitFS(gitfs_opts, ["https://github.com/saltstack/salt-test-pillar-gitfs.git"])


# @skipif_no_gitpython
# def test_gitpython_gitfs_simple(gitpython_gifts_opts):
# _test_gitfs_simple(gitpython_gifts_opts)
@skipif_no_gitpython
def test_gitpython_gitfs_simple(gitpython_gifts_opts):
_test_gitfs_simple(gitpython_gifts_opts)


# @skipif_no_pygit2
# def test_pygit2_gitfs_simple(pygit2_gifts_opts):
# _test_gitfs_simple(pygit2_gifts_opts)
@skipif_no_pygit2
def test_pygit2_gitfs_simple(pygit2_gifts_opts):
_test_gitfs_simple(pygit2_gifts_opts)

0 comments on commit da149d7

Please sign in to comment.