~wwitzel3/juju-core/009-ha-rsyslog-api

« back to all changes in this revision

Viewing changes to utils/ssh/authorisedkeys_test.go

  • Committer: Wayne Witzel III
  • Date: 2014-05-22 13:23:37 UTC
  • mfrom: (2743.1.10 ha-rsyslog-api)
  • Revision ID: wayne.witzel@canonical.com-20140522132337-m9py79a81mjdm9su
merge mfoord

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
        gc "launchpad.net/gocheck"
12
12
 
13
 
        coretesting "launchpad.net/juju-core/testing"
14
 
        "launchpad.net/juju-core/testing/testbase"
 
13
        "launchpad.net/juju-core/testing"
15
14
        "launchpad.net/juju-core/utils/ssh"
16
15
        sshtesting "launchpad.net/juju-core/utils/ssh/testing"
17
16
)
21
20
}
22
21
 
23
22
type AuthorisedKeysKeysSuite struct {
24
 
        testbase.LoggingSuite
 
23
        testing.FakeHomeSuite
25
24
}
26
25
 
27
26
const (
31
30
 
32
31
var _ = gc.Suite(&AuthorisedKeysKeysSuite{})
33
32
 
34
 
func (s *AuthorisedKeysKeysSuite) SetUpTest(c *gc.C) {
35
 
        s.LoggingSuite.SetUpTest(c)
36
 
        fakeHome := coretesting.MakeEmptyFakeHomeWithoutJuju(c)
37
 
        s.AddCleanup(func(*gc.C) { fakeHome.Restore() })
38
 
}
39
 
 
40
33
func writeAuthKeysFile(c *gc.C, keys []string) {
41
34
        err := ssh.WriteAuthorisedKeys(testSSHUser, keys)
42
35
        c.Assert(err, gc.IsNil)