本文整理匯總了Golang中github.com/openshift/origin/pkg/generate/app/cmd.AppConfig.OSClient方法的典型用法代碼示例。如果您正苦於以下問題:Golang AppConfig.OSClient方法的具體用法?Golang AppConfig.OSClient怎麽用?Golang AppConfig.OSClient使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/openshift/origin/pkg/generate/app/cmd.AppConfig
的用法示例。
在下文中一共展示了AppConfig.OSClient方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: PrepareAppConfig
// PrepareAppConfig sets fields in config appropriate for running tests. It
// returns two buffers bound to stdout and stderr.
func PrepareAppConfig(config *cmd.AppConfig) (stdout, stderr *bytes.Buffer) {
config.ExpectToBuild = true
stdout, stderr = new(bytes.Buffer), new(bytes.Buffer)
config.Out, config.ErrOut = stdout, stderr
config.Detector = app.SourceRepositoryEnumerator{
Detectors: source.DefaultDetectors,
Tester: dockerfile.NewTester(),
}
config.DockerSearcher = app.DockerRegistrySearcher{
Client: dockerregistry.NewClient(10*time.Second, true),
}
config.ImageStreamByAnnotationSearcher = fakeImageStreamSearcher()
config.ImageStreamSearcher = fakeImageStreamSearcher()
config.OriginNamespace = "default"
config.OSClient = &client.Fake{}
config.RefBuilder = &app.ReferenceBuilder{}
config.TemplateSearcher = app.TemplateSearcher{
Client: &client.Fake{},
TemplateConfigsNamespacer: &client.Fake{},
Namespaces: []string{"openshift", "default"},
}
config.Typer = kapi.Scheme
return
}