Merge lp:~axwalk/juju-core/cmd-jujud-machinetest-fakehome into lp:~go-bot/juju-core/trunk
Proposed by
Andrew Wilkins
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2211 |
Proposed branch: | lp:~axwalk/juju-core/cmd-jujud-machinetest-fakehome |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
25 lines (+4/-4) 1 file modified
cmd/jujud/machine_test.go (+4/-4) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/cmd-jujud-machinetest-fakehome |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email:
|
Commit message
cmd/jujud: fake $HOME for all machine agent tests
Also, set the "SSHUser" to "", so the authenticationw
does not attempt to read/write ~ubuntu/
Description of the change
cmd/jujud: fake $HOME for all machine agent tests
Also, set the "SSHUser" to "", so the authenticationw
does not attempt to read/write ~ubuntu/
To post a comment you must log in.
Reviewers: mp+201709_ code.launchpad. net,
Message:
Please take a look.
Description:
cmd/jujud: fake $HOME for all machine agent tests
Also, set the "SSHUser" to "", so the authenticationw orker .ssh/authorized _keys.
does not attempt to read/write ~ubuntu/
https:/ /code.launchpad .net/~axwalk/ juju-core/ cmd-jujud- machinetest- fakehome/ +merge/ 201709
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/52260044/
Affected files (+6, -4 lines): machine_ test.go
A [revision details]
M cmd/jujud/
Index: [revision details] 20140115023645- jcncxp07j62jmxr b
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: cmd/jujud/ machine_ test.go machine_ test.go' machine_ test.go 2014-01-14 05:33:34 +0000 machine_ test.go 2014-01-15 03:20:41 +0000 .SetUpTest( c) SetUpTest( c) jujuRun) // ignore error; may not exist .ssh/authorized _keys. MakeEmptyFakeHo meWithoutJuju( c) func(*gc. C) { fakeHome.Restore() }) &authentication worker. SSHUser, "")
=== modified file 'cmd/jujud/
--- cmd/jujud/
+++ cmd/jujud/
@@ -63,6 +63,10 @@
s.agentSuite
s.TestSuite.
os.Remove(
+ // Fake $HOME, and ssh user to avoid touching
~ubuntu/
+ fakeHome := coretesting.
+ s.AddCleanup(
+ s.PatchValue(
}
func (s *MachineSuite) TearDownTest(c *gc.C) {
@@ -577,10 +581,6 @@
}
func (s *MachineSuite) TestMachineAgen tRunsAuthorised KeysWorker( c *gc.C) { MakeEmptyFakeHo meWithoutJuju( c) func(*gc. C) { fakeHome.Restore() }) &authentication worker. SSHUser, "")
- fakeHome := coretesting.
- s.AddCleanup(
- s.PatchValue(
-
// Start the machine agent.
m, _, _ := s.primeAgent(c, state.JobHostUnits)
a := s.newAgent(c, m)