Пример #1
0
	exutil "github.com/openshift/origin/test/extended/util"
)

var _ = g.Describe("[bldcompat][Slow][Compatibility] build controller", func() {
	defer g.GinkgoRecover()
	var (
		oc = exutil.NewCLI("compat-build-controllers", exutil.KubeConfigPath())
	)

	g.JustBeforeEach(func() {
		os.Setenv("OS_TEST_NAMESPACE", oc.Namespace())
	})

	g.Describe("RunBuildControllerTest", func() {
		g.It("should succeed", func() {
			build.RunBuildControllerTest(g.GinkgoT(), oc.AdminClient(), oc.AdminKubeClient())
		})
	})
	g.Describe("RunBuildPodControllerTest", func() {
		g.It("should succeed", func() {
			build.RunBuildPodControllerTest(g.GinkgoT(), oc.AdminClient(), oc.AdminKubeClient())
		})
	})
	g.Describe("RunImageChangeTriggerTest [SkipPrevControllers]", func() {
		g.It("should succeed", func() {
			build.RunImageChangeTriggerTest(g.GinkgoT(), oc.AdminClient())
		})
	})
	g.Describe("RunBuildDeleteTest", func() {
		g.It("should succeed", func() {
			build.RunBuildDeleteTest(g.GinkgoT(), oc.AdminClient(), oc.AdminKubeClient())
Пример #2
0
	ginkgo.AfterEach(func() {
		server.Close()
	})

	ginkgo.Describe("Get", func() {
		ginkgo.It("Get deployment info successfully", func() {
			baseVersion := "1.1.0"
			fullVersion := "1.1.0-bcea65f"
			gitCommitHash := "bcea65f"
			networkType := "SOFTWARE_DEFINED"
			server.SetResponseJson(200,
				Info{
					BaseVersion:   baseVersion,
					FullVersion:   fullVersion,
					GitCommitHash: gitCommitHash,
					NetworkType:   networkType,
				})

			info, err := client.Info.Get()
			ginkgo.GinkgoT().Log(err)

			gomega.Expect(err).Should(gomega.BeNil())
			gomega.Expect(info).ShouldNot(gomega.BeNil())
			gomega.Expect(info.BaseVersion).Should(gomega.Equal(baseVersion))
			gomega.Expect(info.FullVersion).Should(gomega.Equal(fullVersion))
			gomega.Expect(info.GitCommitHash).Should(gomega.Equal(gitCommitHash))
			gomega.Expect(info.NetworkType).Should(gomega.Equal(networkType))
		})
	})
})
Пример #3
0
// VerifyMock asserts the expectations on each of `ms`.
func VerifyMock(ms ...mock.Mock) {
	for _, m := range ms {
		m.AssertExpectations(ginkgo.GinkgoT())
	}
}