Skip to content

Change usecase5 to testing app name for e2e tests #522

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ var _ = AfterSuite(func() {
})

var _ = Describe("odoe2e", func() {
appTestName := "testing"

tmpDir, err := ioutil.TempDir("", "odo")
if err != nil {
Expand Down Expand Up @@ -159,13 +160,13 @@ var _ = Describe("odoe2e", func() {
Describe("creating an application", func() {
Context("when application by the same name doesn't exist", func() {
It("should create an application", func() {
appName := runCmd("odo app create usecase5")
Expect(appName).To(ContainSubstring("usecase5"))
appName := runCmd("odo app create " + appTestName)
Expect(appName).To(ContainSubstring(appTestName))
})

It("should get the current application", func() {
appName := runCmd("odo app get --short")
Expect(appName).To(Equal("usecase5"))
Expect(appName).To(Equal(appTestName))
})

It("should be created within the project", func() {
Expand All @@ -174,18 +175,18 @@ var _ = Describe("odoe2e", func() {
})

It("should be able to create another application", func() {
appName := runCmd("odo app create usecase5-2")
Expect(appName).To(ContainSubstring("usecase5-2"))
appName := runCmd("odo app create " + appTestName + "-2")
Expect(appName).To(ContainSubstring(appTestName + "-2"))
})

It("should be able to delete an application", func() {
// Cleanup
runCmd("odo app delete usecase5-2 -f")
runCmd("odo app delete " + appTestName + "-2 -f")
})

It("should be able to set an application as current", func() {
appName := runCmd("odo app set usecase5")
Expect(appName).To(ContainSubstring("usecase5"))
appName := runCmd("odo app set " + appTestName)
Expect(appName).To(ContainSubstring(appTestName))
})
})

Expand All @@ -210,7 +211,7 @@ var _ = Describe("odoe2e", func() {

It("should create the component within the application", func() {
getApp := runCmd("odo app get --short")
Expect(getApp).To(Equal("usecase5"))
Expect(getApp).To(Equal(appTestName))
})

It("should list the components within the application", func() {
Expand All @@ -227,9 +228,9 @@ var _ = Describe("odoe2e", func() {
Expect(cmpList).To(ContainSubstring("php"))
})

It("should get the application usecase5", func() {
It("should get the application "+appTestName, func() {
appGet := runCmd("odo app get --short")
Expect(appGet).To(Equal("usecase5"))
Expect(appGet).To(Equal(appTestName))
})

It("should be able to set a component as active", func() {
Expand Down Expand Up @@ -358,13 +359,13 @@ var _ = Describe("odoe2e", func() {

Context("deleting the application", func() {
It("should delete application and component", func() {
runCmd("odo app delete usecase5 -f")
runCmd("odo app delete " + appTestName + " -f")

appGet := runCmd("odo app get --short")
Expect(appGet).To(Equal(""))

appList := runCmd("odo app list")
Expect(appList).NotTo(ContainSubstring("usecase5"))
Expect(appList).NotTo(ContainSubstring(appTestName))

cmpList := runCmd("odo list")
Expect(cmpList).NotTo(ContainSubstring("nodejs"))
Expand Down