示例#1
0
文件: util_test.go 项目: bac/juju
func newWatchFixture(c *gc.C, working bool) *watchFixture {
	backend := &watchBackend{working: working}
	resources := common.NewResources()
	facade, err := applicationscaler.NewFacade(backend, resources, auth(true))
	c.Assert(err, jc.ErrorIsNil)
	return &watchFixture{facade, resources}
}
示例#2
0
文件: util_test.go 项目: bac/juju
func newRescaleFixture(c *gc.C) *rescaleFixture {
	facade, err := applicationscaler.NewFacade(rescaleBackend{}, nil, auth(true))
	c.Assert(err, jc.ErrorIsNil)
	return &rescaleFixture{facade}
}
示例#3
0
文件: facade_test.go 项目: bac/juju
func (s *FacadeSuite) TestNotModelManager(c *gc.C) {
	facade, err := applicationscaler.NewFacade(nil, nil, auth(false))
	c.Check(err, gc.Equals, common.ErrPerm)
	c.Check(facade, gc.IsNil)
}
示例#4
0
文件: facade_test.go 项目: bac/juju
func (s *FacadeSuite) TestModelManager(c *gc.C) {
	facade, err := applicationscaler.NewFacade(nil, nil, auth(true))
	c.Check(err, jc.ErrorIsNil)
	c.Check(facade, gc.NotNil)
}