diff --git a/pkg/odo/cli/create/namespace/namespace.go b/pkg/odo/cli/create/namespace/namespace.go index e03f74992b0..5214b63eb97 100644 --- a/pkg/odo/cli/create/namespace/namespace.go +++ b/pkg/odo/cli/create/namespace/namespace.go @@ -22,12 +22,14 @@ const RecommendedCommandName = "namespace" var ( createExample = ktemplates.Examples(` - # Create a new namespace + # Create a new namespace and set it as the current active namespace %[1]s my-namespace `) createLongDesc = ktemplates.LongDesc(`Create a new namespace. This command directly performs actions on the cluster and doesn't require a push. + + Any new namespace created with this command will also be set as the current active namespace. `) createShortDesc = `Create a new namespace` diff --git a/tests/integration/cmd_namespace_test.go b/tests/integration/cmd_namespace_test.go index 04df943c0e4..d8099b1394f 100644 --- a/tests/integration/cmd_namespace_test.go +++ b/tests/integration/cmd_namespace_test.go @@ -42,6 +42,7 @@ var _ = Describe("create/delete/list/get/set namespace tests", func() { }) By("using an invalid namespace name", func() { helper.Cmd("odo", "create", "namespace", "12345").ShouldFail() + Expect(commonVar.CliRunner.GetActiveNamespace()).To(Equal(commonVar.Project)) }) }) })