mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
List namespace right after namespace has been created (#6922)
* List namespace right after namespace has been created Signed-off-by: Parthvi Vala <pvala@redhat.com> * Add sleep after listing namespaces Signed-off-by: Parthvi Vala <pvala@redhat.com> * Error out when timeout is reached Signed-off-by: Parthvi Vala <pvala@redhat.com> * Modify spinner messages Signed-off-by: Parthvi Vala <pvala@redhat.com> * Attempt at fixing doc tests Signed-off-by: Parthvi Vala <pvala@redhat.com> --------- Signed-off-by: Parthvi Vala <pvala@redhat.com>
This commit is contained in:
@@ -41,7 +41,9 @@ func StripSpinner(docString string) (returnString string) {
|
||||
if (strings.HasPrefix(line, "• Downloading") ||
|
||||
strings.HasPrefix(line, "• Syncing") ||
|
||||
strings.HasPrefix(line, "• Building") ||
|
||||
strings.HasPrefix(line, "• Waiting for the application")) &&
|
||||
strings.HasPrefix(line, "• Waiting for the application") ||
|
||||
strings.HasPrefix(line, "• Creating the namespace") ||
|
||||
strings.HasPrefix(line, "• Creating the project")) &&
|
||||
strings.HasSuffix(line, "...") {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -25,6 +25,20 @@ var _ = Describe("odo create/delete/list/set namespace/project tests", func() {
|
||||
AfterEach(func() {
|
||||
helper.CommonAfterEach(commonVar)
|
||||
})
|
||||
|
||||
When("namespace is created with -w", func() {
|
||||
// Ref: https://github.com/redhat-developer/odo/issues/6827
|
||||
var namespace string
|
||||
BeforeEach(func() {
|
||||
namespace = helper.GetProjectName()
|
||||
helper.Cmd("odo", "create", "namespace", namespace, "--wait").ShouldPass()
|
||||
})
|
||||
It("should list the new namespace when listing namespace", func() {
|
||||
out := helper.Cmd("odo", "list", "namespace").ShouldPass().Out()
|
||||
Expect(out).To(ContainSubstring(namespace))
|
||||
})
|
||||
})
|
||||
|
||||
for _, commandName := range []string{"namespace", "project"} {
|
||||
// this is a workaround to ensure that the for loop works with `It` blocks
|
||||
commandName := commandName
|
||||
|
||||
Reference in New Issue
Block a user