本文整理汇总了Golang中github.com/openshift/origin/test/extended/util.DumpAndReturnTagging函数的典型用法代码示例。如果您正苦于以下问题:Golang DumpAndReturnTagging函数的具体用法?Golang DumpAndReturnTagging怎么用?Golang DumpAndReturnTagging使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DumpAndReturnTagging函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: doTest
func doTest(bldPrefix, debugStr string, same bool, oc *exutil.CLI) {
// corrupt the builder image
exutil.CorruptImage(fullImageName, corruptor)
if bldPrefix == buildPrefixFC || bldPrefix == buildPrefixTC {
// grant access to the custom build strategy
err := oc.AsAdmin().Run("adm").Args("policy", "add-cluster-role-to-user", "system:build-strategy-custom", oc.Username()).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
defer func() {
err = oc.AsAdmin().Run("adm").Args("policy", "remove-cluster-role-from-user", "system:build-strategy-custom", oc.Username()).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
}()
}
// kick off the app/lang build and verify the builder image accordingly
_, err := exutil.StartBuildAndWait(oc, bldPrefix)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())
if same {
exutil.VerifyImagesSame(fullImageName, corruptor, debugStr)
} else {
exutil.VerifyImagesDifferent(fullImageName, corruptor, debugStr)
}
// reset corrupted tagging for next test
exutil.ResetImage(resetData)
// dump tags/hexids for debug
_, err = exutil.DumpAndReturnTagging(tags)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:30,代码来源:forcepull.go
示例2: doTest
func doTest(bldPrefix, bldName, debugStr string, same bool, oc *exutil.CLI) {
// corrupt the builder image
exutil.CorruptImage(fullImageName, corruptor)
// kick off the app/lang build and verify the builder image accordingly
exutil.StartBuild(bldPrefix, oc)
exutil.WaitForBuild(debugStr, bldName, oc)
if same {
exutil.VerifyImagesSame(fullImageName, corruptor, debugStr)
} else {
exutil.VerifyImagesDifferent(fullImageName, corruptor, debugStr)
}
// reset corrupted tagging for next test
exutil.ResetImage(resetData)
// dump tags/hexids for debug
exutil.DumpAndReturnTagging(tags)
}
开发者ID:johnmccawley,项目名称:origin,代码行数:18,代码来源:forcepull.go
示例3: doTest
func doTest(bldPrefix, debugStr string, same bool, oc *exutil.CLI) {
// corrupt the builder image
exutil.CorruptImage(fullImageName, corruptor)
// kick off the app/lang build and verify the builder image accordingly
_, err := exutil.StartBuildAndWait(oc, bldPrefix)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())
if same {
exutil.VerifyImagesSame(fullImageName, corruptor, debugStr)
} else {
exutil.VerifyImagesDifferent(fullImageName, corruptor, debugStr)
}
// reset corrupted tagging for next test
exutil.ResetImage(resetData)
// dump tags/hexids for debug
_, err = exutil.DumpAndReturnTagging(tags)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())
}
开发者ID:abhgupta,项目名称:origin,代码行数:20,代码来源:forcepull.go
示例4:
}
var _ = g.Describe("[jenkins][Slow] openshift pipeline plugin", func() {
defer g.GinkgoRecover()
var oc = exutil.NewCLI("jenkins-plugin", exutil.KubeConfigPath())
var hostPort string
g.BeforeEach(func() {
g.By("set up policy for jenkins jobs")
err := oc.Run("policy").Args("add-role-to-user", "edit", "system:serviceaccount:"+oc.Namespace()+":default").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
g.By("kick off the build for the jenkins ephermeral and application templates")
tag := []string{"openshift/jenkins-plugin-snapshot-test:latest"}
hexIDs, err := exutil.DumpAndReturnTagging(tag)
var jenkinsEphemeralPath string
var testingSnapshot bool
if len(hexIDs) > 0 && err == nil {
// found an openshift pipeline plugin test image, must be testing a proposed change to the plugin
jenkinsEphemeralPath = exutil.FixturePath("fixtures", "jenkins-ephemeral-template-test-new-plugin.json")
testingSnapshot = true
} else {
// no test image, testing the base jenkins image with the current, supported version of the plugin
jenkinsEphemeralPath = exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json")
}
err = oc.Run("new-app").Args(jenkinsEphemeralPath).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
jenkinsApplicationPath := exutil.FixturePath("..", "..", "examples", "jenkins", "application-template.json")
err = oc.Run("new-app").Args(jenkinsApplicationPath).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
开发者ID:RomainVabre,项目名称:origin,代码行数:31,代码来源:plugin.go
示例5:
err = exutil.PullImage(fullImageName, *authCfg)
o.Expect(err).NotTo(o.HaveOccurred())
//update the build configs in the json for the app/lang builds to point to the builder images in the internal docker registry
// and then create the build config resources
pre := exutil.FixturePath("fixtures", "forcepull-test.json")
post := exutil.ArtifactPath("forcepull-test.json")
varSubDest = authCfg.ServerAddress + "/" + oc.Namespace()
err = exutil.VarSubOnFile(pre, post, varSubSrc, varSubDest)
o.Expect(err).NotTo(o.HaveOccurred())
err = exutil.CreateResource(post, oc)
o.Expect(err).NotTo(o.HaveOccurred())
// dump the image textual tags and hex ids out for debug
tags = []string{fullImageName + ":latest", corruptor + ":latest"}
hexIDs := exutil.DumpAndReturnTagging(tags)
resetData = map[string]string{fullImageName: hexIDs[0], corruptor: hexIDs[1]}
})
g.Context("ForcePull test context ", func() {
g.JustBeforeEach(func() {
g.By("waiting for builder service account")
err := exutil.WaitForBuilderAccount(oc.AdminKubeREST().ServiceAccounts(oc.Namespace()))
o.Expect(err).NotTo(o.HaveOccurred())
})
g.It("ForcePull test case execution", func() {
g.By("when s2i force pull is false")
开发者ID:johnmccawley,项目名称:origin,代码行数:31,代码来源:forcepull.go
注:本文中的github.com/openshift/origin/test/extended/util.DumpAndReturnTagging函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论