Skip to content

Commit

Permalink
Adding URL now flag delete test
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
  • Loading branch information
mohammedzee1000 committed May 21, 2020
1 parent 787d644 commit 89706ec
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/devfile/cmd_devfile_url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ var _ = Describe("odo devfile url command tests", func() {
helper.MatchAllInOutput(stdout, []string{"URL " + url1 + " created for component", "http:", url1 + "." + host})
})

It("delete with now flag should pass", func() {
var stdout string
url1 := helper.RandString(5)
host := helper.RandString(5) + ".com"

helper.CmdShouldPass("odo", "create", "nodejs", "--project", namespace, componentName)
helper.CopyExample(filepath.Join("source", "devfiles", "nodejs", "project"), context)
helper.CopyExampleDevFile(filepath.Join("source", "devfiles", "nodejs", "devfile.yaml"), filepath.Join(context, "devfile.yaml"))
helper.CmdShouldPass("odo", "url", "create", url1, "--port", "3000", "--host", host, "--ingress", "--devfile", "devfile.yaml")
helper.CmdShouldPass("odo", "push")
stdout = helper.CmdShouldPass("odo", "url", "delete", url1, "--now")
helper.MatchAllInOutput(stdout, []string{"URL " + url1 + " successfully deleted", "Applying URL changes"})
})

It("should create a automatically route on a openShift cluster", func() {

if os.Getenv("KUBERNETES") == "true" {
Expand Down

0 comments on commit 89706ec

Please sign in to comment.