Skip to content

Commit

Permalink
No longer stop and start the Dev session after removing the Binding
Browse files Browse the repository at this point in the history
This is possible now that redhat-developer#6101 [1] has been fixed.

[1] redhat-developer#6101
  • Loading branch information
rm3l committed Jan 5, 2023
1 parent 4f962c2 commit 204081d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/e2escenarios/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,16 +383,19 @@ var _ = Describe("E2E Test", func() {
stdout = helper.Cmd("odo", "list").ShouldPass().Out()
helper.MatchAllInOutput(stdout, []string{componentName, "Go", "Dev", bindingName})

// "exit dev mode"
devSession.Stop()
devSession.WaitEnd()

// remove bindings and check devfile to not contain binding info
// TODO: move `remove binding` inside devsession after https://github.com/redhat-developer/odo/issues/6101 is fixed
helper.Cmd("odo", "remove", "binding", "--name", bindingName).ShouldPass()

devSession, _, _, _, err = helper.StartDevMode(helper.DevSessionOpts{})
Expect(err).To(BeNil())
// Get new random port after restart
Eventually(func(g Gomega) map[string]string {
_, _, ports, err = devSession.GetInfo()
g.Expect(err).ToNot(HaveOccurred())
return ports
}, 180, 10).ShouldNot(BeEmpty())

_, err = receiveData(fmt.Sprintf(ports["8080"] + "/api/user"))
Expect(err).ToNot(BeNil()) // should fail as application is not connected to DB

stdout = helper.Cmd("odo", "describe", "binding").ShouldPass().Out()
Expect(stdout).To(ContainSubstring("No ServiceBinding used by the current component"))

Expand Down

0 comments on commit 204081d

Please sign in to comment.