Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Jul 27, 2023
1 parent 23407e8 commit ab78745
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion tests/integration/interactive_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit ab78745

Please sign in to comment.