Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1782467: move more image-eco db template tests from upstream repos to sample o… #24391

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/jenkins/pipeline/nodejs-sample-pipeline.yaml
Expand Up @@ -7,7 +7,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
// path of the template to use
def templatePath = 'https://raw.githubusercontent.com/openshift/nodejs-ex/master/openshift/templates/nodejs-mongodb.json'
def templatePath = 'nodejs-mongodb-example'
// name of the template that will be created
def templateName = 'nodejs-mongodb-example'
// NOTE, the "pipeline" directive/closure from the declarative pipeline syntax needs to include, or be nested outside,
Expand Down
6 changes: 3 additions & 3 deletions test/extended/image_ecosystem/mariadb_ephemeral.go
Expand Up @@ -12,7 +12,7 @@ import (
var _ = g.Describe("[image_ecosystem][mariadb][Slow] openshift mariadb image", func() {
defer g.GinkgoRecover()
var (
templatePath = exutil.FixturePath("..", "..", "examples", "db-templates", "mariadb-ephemeral-template.json")
templatePath = "mariadb-ephemeral"
oc = exutil.NewCLI("mariadb-create", exutil.KubeConfigPath())
)

Expand All @@ -33,8 +33,8 @@ var _ = g.Describe("[image_ecosystem][mariadb][Slow] openshift mariadb image", f
g.It(fmt.Sprintf("should instantiate the template"), func() {
exutil.WaitForOpenShiftNamespaceImageStreams(oc)

g.By(fmt.Sprintf("calling oc process -f %q", templatePath))
configFile, err := oc.Run("process").Args("-f", templatePath).OutputToFile("config.json")
g.By(fmt.Sprintf("calling oc process %q", templatePath))
configFile, err := oc.Run("process").Args("openshift//" + templatePath).OutputToFile("config.json")
o.Expect(err).NotTo(o.HaveOccurred())

g.By(fmt.Sprintf("calling oc create -f %q", configFile))
Expand Down
4 changes: 2 additions & 2 deletions test/extended/image_ecosystem/mongodb_ephemeral.go
Expand Up @@ -15,7 +15,7 @@ import (
var _ = g.Describe("[image_ecosystem][mongodb] openshift mongodb image", func() {
defer g.GinkgoRecover()

templatePath := exutil.FixturePath("..", "..", "examples", "db-templates", "mongodb-ephemeral-template.json")
templatePath := "mongodb-ephemeral"
oc := exutil.NewCLI("mongodb-create", exutil.KubeConfigPath()).Verbose()

g.Context("", func() {
Expand All @@ -35,7 +35,7 @@ var _ = g.Describe("[image_ecosystem][mongodb] openshift mongodb image", func()

exutil.WaitForOpenShiftNamespaceImageStreams(oc)
g.By("creating a new app")
o.Expect(oc.Run("new-app").Args("-f", templatePath).Execute()).Should(o.Succeed())
o.Expect(oc.Run("new-app").Args(templatePath).Execute()).Should(o.Succeed())

g.By("waiting for the deployment to complete")
err := exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().AppsV1(), oc.Namespace(), "mongodb", 1, true, oc)
Expand Down
6 changes: 3 additions & 3 deletions test/extended/image_ecosystem/mysql_ephemeral.go
Expand Up @@ -12,7 +12,7 @@ import (
var _ = g.Describe("[image_ecosystem][mysql][Slow] openshift mysql image", func() {
defer g.GinkgoRecover()
var (
templatePath = exutil.FixturePath("..", "..", "examples", "db-templates", "mysql-ephemeral-template.json")
templatePath = "mysql-ephemeral"
oc = exutil.NewCLI("mysql-create", exutil.KubeConfigPath())
)

Expand All @@ -31,8 +31,8 @@ var _ = g.Describe("[image_ecosystem][mysql][Slow] openshift mysql image", func(
g.Describe("Creating from a template", func() {
g.It(fmt.Sprintf("should instantiate the template"), func() {

g.By(fmt.Sprintf("calling oc process -f %q", templatePath))
configFile, err := oc.Run("process").Args("-f", templatePath).OutputToFile("config.json")
g.By(fmt.Sprintf("calling oc process %q", templatePath))
configFile, err := oc.Run("process").Args("openshift//" + templatePath).OutputToFile("config.json")
o.Expect(err).NotTo(o.HaveOccurred())

g.By(fmt.Sprintf("calling oc create -f %q", configFile))
Expand Down
2 changes: 1 addition & 1 deletion test/extended/testdata/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.