Example #1
0
func (*EnvironInfoTest) TestEmptyUser(c *gc.C) {
	info := &fakeEnvironInfo{}
	c.Assert(juju.EnvironInfoUserTag(info), gc.Equals, names.NewUserTag(configstore.DefaultAdminUsername))
}
Example #2
0
func (*EnvironInfoTest) TestRealUser(c *gc.C) {
	info := &fakeEnvironInfo{user: "******"}
	c.Assert(juju.EnvironInfoUserTag(info), gc.Equals, names.NewUserTag("eric"))
}
Example #3
0
func (*EnvironInfoTest) TestNullInfo(c *gc.C) {
	c.Assert(juju.EnvironInfoUserTag(nil), gc.Equals, names.NewUserTag(configstore.DefaultAdminUsername))
}