From ab787454b4051c36c92f325b2e5cb461b62ddda3 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Thu, 27 Jul 2023 13:52:01 +0200 Subject: [PATCH] Fix integration tests --- tests/integration/interactive_init_test.go | 32 +++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/integration/interactive_init_test.go b/tests/integration/interactive_init_test.go index 1895db876d6..0a0b4ae3d4c 100644 --- a/tests/integration/interactive_init_test.go +++ b/tests/integration/interactive_init_test.go @@ -56,6 +56,9 @@ var _ = Describe("odo init interactive command tests", func() { helper.ExpectString(ctx, messages.InteractiveModeEnabled) }) + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "Go") @@ -97,6 +100,9 @@ var _ = Describe("odo init interactive command tests", func() { command := []string{"odo", "init"} output, err := helper.RunInteractive(command, nil, func(ctx helper.InteractiveContext) { + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "Javascript") @@ -148,6 +154,9 @@ var _ = Describe("odo init interactive command tests", func() { command := []string{"odo", "init"} _, err := helper.RunInteractive(command, nil, func(ctx helper.InteractiveContext) { + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "Go") @@ -192,6 +201,9 @@ var _ = Describe("odo init interactive command tests", func() { output, err := helper.RunInteractive(command, nil, func(ctx helper.InteractiveContext) { + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "Go") @@ -230,6 +242,9 @@ var _ = Describe("odo init interactive command tests", func() { helper.ExpectString(ctx, messages.InteractiveModeEnabled) }) + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "Go") @@ -265,6 +280,9 @@ var _ = Describe("odo init interactive command tests", func() { output, err := helper.RunInteractive(command, nil, func(ctx helper.InteractiveContext) { + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "Go") @@ -301,6 +319,9 @@ var _ = Describe("odo init interactive command tests", func() { helper.ExpectString(ctx, messages.InteractiveModeEnabled) }) + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "java") @@ -395,6 +416,9 @@ var _ = Describe("odo init interactive command tests", func() { welcomingMsgs := strings.Split(odolog.Stitle(messages.InitializingNewComponent, messages.NoSourceCodeDetected, "odo version: "+version.VERSION), "\n") output, err := testRunner(language, welcomingMsgs, func(ctx helper.InteractiveContext) { + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, language) @@ -547,6 +571,9 @@ var _ = Describe("odo init interactive command tests", func() { output, err := helper.RunInteractive([]string{"odo", "init"}, nil, func(ctx helper.InteractiveContext) { + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, ".NET") @@ -643,7 +670,7 @@ var _ = Describe("odo init interactive command tests", func() { _, 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.ExpectString(ctx, "Select architectures") ctx.StopCommand() }) Expect(err).Should(HaveOccurred()) @@ -689,6 +716,9 @@ spec: } output, err := helper.RunInteractive([]string{"odo", "init"}, nil, func(ctx helper.InteractiveContext) { + helper.ExpectString(ctx, "Select architectures") + helper.SendLine(ctx, "") + helper.ExpectString(ctx, "Select language") helper.SendLine(ctx, "Java")