Skip to content

Commit

Permalink
We now have a trailing newline and need to match accordingly.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameinel committed Aug 19, 2021
1 parent d8cfc2b commit 64f3c87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cloudconfig/userdatacfg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/.
Expand All @@ -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
}
Expand Down

0 comments on commit 64f3c87

Please sign in to comment.