本文整理汇总了Golang中github.com/juju/juju/cmd/juju/common.NewCmdBlockHelper函数的典型用法代码示例。如果您正苦于以下问题:Golang NewCmdBlockHelper函数的具体用法?Golang NewCmdBlockHelper怎么用?Golang NewCmdBlockHelper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewCmdBlockHelper函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: SetUpTest
func (s *RemoveServiceSuite) SetUpTest(c *gc.C) {
s.RepoSuite.SetUpTest(c)
s.CmdBlockHelper = common.NewCmdBlockHelper(s.APIState)
c.Assert(s.CmdBlockHelper, gc.NotNil)
s.AddCleanup(func(*gc.C) { s.CmdBlockHelper.Close() })
s.stub = &jutesting.Stub{}
s.budgetAPIClient = &mockAPIClient{Stub: s.stub}
s.PatchValue(&getBudgetAPIClient, func(*http.Client) (budgetAPIClient, error) { return s.budgetAPIClient, nil })
}
开发者ID:OSBI,项目名称:juju,代码行数:9,代码来源:removeservice_test.go
示例2: SetUpTest
func (s *UpgradeJujuSuite) SetUpTest(c *gc.C) {
s.JujuConnSuite.SetUpTest(c)
s.resources = common.NewResources()
s.authoriser = apiservertesting.FakeAuthorizer{
Tag: s.AdminUserTag(c),
}
s.CmdBlockHelper = cmdcommon.NewCmdBlockHelper(s.APIState)
c.Assert(s.CmdBlockHelper, gc.NotNil)
s.AddCleanup(func(*gc.C) { s.CmdBlockHelper.Close() })
}
开发者ID:makyo,项目名称:juju,代码行数:11,代码来源:upgradejuju_test.go
示例3: SetUpTest
func (s *UpgradeCharmSuccessSuite) SetUpTest(c *gc.C) {
s.RepoSuite.SetUpTest(c)
s.path = testcharms.Repo.ClonedDirPath(s.SeriesPath, "riak")
err := runDeploy(c, "local:riak", "riak")
c.Assert(err, jc.ErrorIsNil)
s.riak, err = s.State.Service("riak")
c.Assert(err, jc.ErrorIsNil)
ch, forced, err := s.riak.Charm()
c.Assert(err, jc.ErrorIsNil)
c.Assert(ch.Revision(), gc.Equals, 7)
c.Assert(forced, jc.IsFalse)
s.CmdBlockHelper = common.NewCmdBlockHelper(s.APIState)
c.Assert(s.CmdBlockHelper, gc.NotNil)
s.AddCleanup(func(*gc.C) { s.CmdBlockHelper.Close() })
}
开发者ID:OSBI,项目名称:juju,代码行数:16,代码来源:upgradecharm_test.go
示例4: Reset
// JujuConnSuite very helpfully uploads some default
// tools to the environment's storage. We don't want
// 'em there; but we do want a consistent default-series
// in the environment state.
func (s *UpgradeJujuSuite) Reset(c *gc.C) {
s.JujuConnSuite.Reset(c)
envtesting.RemoveTools(c, s.DefaultToolsStorage, s.Environ.Config().AgentStream())
updateAttrs := map[string]interface{}{
"default-series": "raring",
"agent-version": "1.2.3",
}
err := s.State.UpdateModelConfig(updateAttrs, nil, nil)
c.Assert(err, jc.ErrorIsNil)
s.PatchValue(&sync.BuildToolsTarball, toolstesting.GetMockBuildTools(c))
// Set API host ports so FindTools works.
hostPorts := [][]network.HostPort{
network.NewHostPorts(1234, "0.1.2.3"),
}
err = s.State.SetAPIHostPorts(hostPorts)
c.Assert(err, jc.ErrorIsNil)
s.CmdBlockHelper = cmdcommon.NewCmdBlockHelper(s.APIState)
c.Assert(s.CmdBlockHelper, gc.NotNil)
s.AddCleanup(func(*gc.C) { s.CmdBlockHelper.Close() })
}
开发者ID:makyo,项目名称:juju,代码行数:26,代码来源:upgradejuju_test.go
示例5: SetUpTest
func (s *ResolvedSuite) SetUpTest(c *gc.C) {
s.RepoSuite.SetUpTest(c)
s.CmdBlockHelper = common.NewCmdBlockHelper(s.APIState)
c.Assert(s.CmdBlockHelper, gc.NotNil)
s.AddCleanup(func(*gc.C) { s.CmdBlockHelper.Close() })
}
开发者ID:makyo,项目名称:juju,代码行数:6,代码来源:resolved_test.go
示例6: SetUpTest
func (s *keySuiteBase) SetUpTest(c *gc.C) {
s.JujuConnSuite.SetUpTest(c)
s.CmdBlockHelper = common.NewCmdBlockHelper(s.APIState)
c.Assert(s.CmdBlockHelper, gc.NotNil)
s.AddCleanup(func(*gc.C) { s.CmdBlockHelper.Close() })
}
开发者ID:pmatulis,项目名称:juju,代码行数:6,代码来源:authorizedkeys_test.go
注:本文中的github.com/juju/juju/cmd/juju/common.NewCmdBlockHelper函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论