-
Notifications
You must be signed in to change notification settings - Fork 0
/
pullsecret.go
43 lines (36 loc) · 1.15 KB
/
pullsecret.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package builds
import (
"fmt"
g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"
exutil "github.com/openshift/origin/test/extended/util"
)
var _ = g.Describe("[Feature:Builds][Slow] using pull secrets in a build", func() {
defer g.GinkgoRecover()
var (
exampleBuild = exutil.FixturePath("testdata", "builds", "test-docker-app")
oc = exutil.NewCLI("cli-pullsecret-build", exutil.KubeConfigPath())
)
g.Context("", func() {
g.BeforeEach(func() {
exutil.PreTestDump()
})
g.Context("start-build test context", func() {
g.AfterEach(func() {
if g.CurrentGinkgoTestDescription().Failed {
exutil.DumpPodStates(oc)
exutil.DumpPodLogsStartingWith("", oc)
}
})
g.Describe("binary builds", func() {
g.It("should be able to run a build that is implicitly pulling from the internal registry", func() {
g.By("creating a build")
err := oc.Run("new-build").Args("--binary", "--strategy=docker", "--name=docker").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
br, err := exutil.StartBuildAndWait(oc, "docker", fmt.Sprintf("--from-dir=%s", exampleBuild))
br.AssertSuccess()
})
})
})
})
})