Skip to content

Commit

Permalink
fix ImportJavaIS naming, and fix storage test
Browse files Browse the repository at this point in the history
  • Loading branch information
kadel committed Sep 2, 2019
1 parent c335e0c commit 2f6c931
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/benchmark/basic_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var _ = Describe("Basic benchmark", func() {

Measure("Simple Java (Javalin) component", func(b Benchmarker) {
helper.CopyExample(filepath.Join("source", "openjdk"), context)
oc.ImportJavaIs(project)
oc.ImportJavaIS(project)

b.Time("create component", func() {
helper.CmdShouldPass(odo, "component", "create", "java", "javacomponent", "--app", "myapp")
Expand Down
4 changes: 2 additions & 2 deletions tests/e2escenarios/core_beta_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ var _ = Describe("Core beta flow", func() {
})

It("create local java component and push code", func() {
oc.ImportJavaIs(project)
oc.ImportJavaIS(project)
helper.CopyExample(filepath.Join("source", "openjdk"), context)
TestBasicCreateConfigPush()
})
Expand All @@ -131,7 +131,7 @@ var _ = Describe("Core beta flow", func() {
})

It("create local java component and push code", func() {
oc.ImportJavaIs(project)
oc.ImportJavaIS(project)
helper.CopyExample(filepath.Join("source", "openjdk"), context)
TestBasicCreateConfigPush("--context", context)
})
Expand Down
8 changes: 4 additions & 4 deletions tests/helper/helper_oc.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ func (oc *OcRunner) checkForImageStream(name string, tag string) bool {
return false
}

// ImportJavaIs import the openjdk image which is used for jars
func (oc *OcRunner) ImportJavaIs(project string) {
// ImportJavaIS import the openjdk image which is used for jars
func (oc *OcRunner) ImportJavaIS(project string) {
// if ImageStram already exists, no need to do anything
if oc.checkForImageStream("java", "8") {
return
Expand All @@ -274,8 +274,8 @@ func (oc *OcRunner) ImportJavaIs(project string) {
"tags=builder", "--overwrite")
}

// ImportDotnet20Is import the dotnet image
func (oc *OcRunner) ImportDotnet20Is(project string) {
// ImportDotnet20IS import the dotnet image
func (oc *OcRunner) ImportDotnet20IS(project string) {
// if ImageStram already exists, no need to do anything
if oc.checkForImageStream("dotnet", "2.0") {
return
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/cmd_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ var _ = Describe("odo storage command", func() {

Context("when running storage command without required flag(s)", func() {
It("should fail", func() {
helper.CopyExample(filepath.Join("source", "openjdk"), context)
helper.CmdShouldPass("odo", "component", "create", "java", "java:8", "--app", "javaapp", "--project", project, "--context", context)
helper.CopyExample(filepath.Join("source", "nodejs"), context)
helper.CmdShouldPass("odo", "component", "create", "node", "nodejs", "--app", "nodeapp", "--project", project, "--context", context)
stdErr := helper.CmdShouldFail("odo", "storage", "create", "pv1")
Expect(stdErr).To(ContainSubstring("Required flag"))
//helper.CmdShouldFail("odo", "storage", "create", "pv1", "-o", "json")
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/java_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var _ = Describe("odoJavaE2e", func() {
})

It("Should be able to deploy a git repo that contains a java uberjar application using openjdk", func() {
oc.ImportJavaIs(project)
oc.ImportJavaIS(project)

// Deploy the git repo / wildfly example
helper.CmdShouldPass("odo", "create", "java:8", "uberjar-git-test", "--project",
Expand All @@ -92,7 +92,7 @@ var _ = Describe("odoJavaE2e", func() {
})

It("Should be able to deploy a spring boot uberjar file using openjdk", func() {
oc.ImportJavaIs(project)
oc.ImportJavaIS(project)
helper.CopyExample(filepath.Join("binary", "java", "openjdk"), context)

helper.CmdShouldPass("odo", "create", "java:8", "sb-jar-test", "--project",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/servicecatalog/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var _ = Describe("odoServiceE2e", func() {
os.Unsetenv("GLOBALODOCONFIG")
})
It("should be able to create postgresql and link it with springboot", func() {
oc.ImportJavaIs(project)
oc.ImportJavaIS(project)
helper.CopyExample(filepath.Join("source", "openjdk-sb-postgresql"), context)

// Local config needs to be present in order to create service https://github.com/openshift/odo/issues/1602
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var _ = Describe("odoSourceE2e", func() {
})

It("Should be able to deploy an openjdk source application", func() {
oc.ImportJavaIs(project)
oc.ImportJavaIS(project)
helper.CopyExample(filepath.Join("source", "openjdk"), context)
helper.CmdShouldPass("odo", "create", "java:8", "openjdk-app", "--project",
project, "--context", context)
Expand Down Expand Up @@ -121,7 +121,7 @@ var _ = Describe("odoSourceE2e", func() {
})

It("Should be able to deploy a dotnet source application", func() {
oc.ImportDotnet20Is(project)
oc.ImportDotnet20IS(project)

helper.CopyExample(filepath.Join("source", "dotnet"), context)
helper.CmdShouldPass("odo", "create", "dotnet:2.0", "dotnet-app", "--project",
Expand Down

0 comments on commit 2f6c931

Please sign in to comment.