-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#13251 from jameinel/2.9-proxy-issue-4
juju#13251 Update to the new change from stgraber. proxy: Add trailing newline to AsScriptEnvironment This makes /etc/juju-proxy.conf be a properly formatted shell script with a trailing new line (makes it easier to read). ## QA steps When using a proxy in the environment, see that /etc/proxy.conf now contains a trailing newline. ```sh $ juju bootstrap --config ftp-proxy=https://test.invalid ``` ## Documentation changes None ## Bug reference None
- Loading branch information
Showing
3 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1257,10 +1257,12 @@ func (s *cloudinitSuite) TestProxyWritten(c *gc.C) { | |
`export HTTP_PROXY=http://[email protected]`, | ||
`export no_proxy=0.1.2.3,10.0.3.1,localhost`, | ||
`export NO_PROXY=0.1.2.3,10.0.3.1,localhost`, | ||
``, | ||
`(printf '%s\n' 'export http_proxy=http://[email protected] | ||
export HTTP_PROXY=http://[email protected] | ||
export no_proxy=0.1.2.3,10.0.3.1,localhost | ||
export NO_PROXY=0.1.2.3,10.0.3.1,localhost' > /etc/juju-proxy.conf && chmod 0644 /etc/juju-proxy.conf)`, | ||
export NO_PROXY=0.1.2.3,10.0.3.1,localhost | ||
' > /etc/juju-proxy.conf && chmod 0644 /etc/juju-proxy.conf)`, | ||
`printf '%s\n' '# To allow juju to control the global systemd proxy settings, | ||
# create symbolic links to this file from within /etc/systemd/system.conf.d/ | ||
# and /etc/systemd/users.conf.d/. | ||
|
@@ -1271,7 +1273,7 @@ DefaultEnvironment="http_proxy=http://[email protected]" "HTTP_PROXY=http://user@10. | |
found := false | ||
for i, cmd := range cmds { | ||
if cmd == first { | ||
c.Assert(cmds[i+1:i+7], jc.DeepEquals, expected) | ||
c.Assert(cmds[i+1:i+8], jc.DeepEquals, expected) | ||
found = true | ||
break | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters