diff --git a/tests/integration/interactive_deploy_test.go b/tests/integration/interactive_deploy_test.go index 83a9c1f227b..f0fe30b7fa7 100644 --- a/tests/integration/interactive_deploy_test.go +++ b/tests/integration/interactive_deploy_test.go @@ -157,28 +157,12 @@ var _ = Describe("odo deploy interactive command tests", func() { }) It("should not fail but fallback to the interactive mode", func() { - output, err := helper.RunInteractive([]string{"odo", "deploy"}, nil, func(ctx helper.InteractiveContext) { + _, err := helper.RunInteractive([]string{"odo", "deploy"}, nil, func(ctx helper.InteractiveContext) { helper.ExpectString(ctx, "Could not determine a Devfile based on the files in the current directory") - helper.ExpectString(ctx, "Select language") - helper.SendLine(ctx, "PHP") - - helper.ExpectString(ctx, "Select project type") - helper.SendLine(ctx, "") - - helper.ExpectString(ctx, "Select container for which you want to change configuration?") - helper.SendLine(ctx, "") - - helper.ExpectString(ctx, "Enter component name") - helper.SendLine(ctx, "my-php-app") - - helper.ExpectString(ctx, "no default deploy command found in devfile") + ctx.StopCommand() }) - - Expect(err).To(Not(BeNil())) - Expect(output).ShouldNot(ContainSubstring("Which starter project do you want to use")) - Expect(output).To(ContainSubstring("no default deploy command found in devfile")) - Expect(helper.ListFilesInDir(commonVar.Context)).To(ContainElement("devfile.yaml")) + Expect(err).Should(HaveOccurred()) }) }) }) diff --git a/tests/integration/interactive_init_test.go b/tests/integration/interactive_init_test.go index cdc687e5e8e..62fbe09f28c 100644 --- a/tests/integration/interactive_init_test.go +++ b/tests/integration/interactive_init_test.go @@ -653,27 +653,13 @@ var _ = Describe("odo init interactive command tests", func() { }) It("should not fail but fallback to the interactive mode", func() { - output, err := helper.RunInteractive([]string{"odo", "init"}, nil, func(ctx helper.InteractiveContext) { + _, err := helper.RunInteractive([]string{"odo", "init"}, nil, func(ctx helper.InteractiveContext) { helper.ExpectString(ctx, "Could not determine a Devfile based on the files in the current directory") helper.ExpectString(ctx, "Select language") - helper.SendLine(ctx, "PHP") - - helper.ExpectString(ctx, "Select project type") - helper.SendLine(ctx, "") - - helper.ExpectString(ctx, "Select container for which you want to change configuration?") - helper.SendLine(ctx, "") - - helper.ExpectString(ctx, "Enter component name") - helper.SendLine(ctx, "my-php-app") - - helper.ExpectString(ctx, "Your new component 'my-php-app' is ready in the current directory") + ctx.StopCommand() }) - - Expect(err).ShouldNot(HaveOccurred()) - Expect(output).ShouldNot(ContainSubstring("Which starter project do you want to use")) - Expect(helper.ListFilesInDir(commonVar.Context)).To(ContainElement("devfile.yaml")) + Expect(err).Should(HaveOccurred()) }) }) })