Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making package testingutil and ui work for unit test build on windows #2630

Closed
prietyc123 opened this issue Feb 25, 2020 · 2 comments · Fixed by #2783
Closed

making package testingutil and ui work for unit test build on windows #2630

prietyc123 opened this issue Feb 25, 2020 · 2 comments · Fixed by #2783
Assignees
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/bug Categorizes issue or PR as related to a bug.
Projects

Comments

@prietyc123
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System: windows

Output of odo version: master

How did you run odo exactly?

make test
Note: odo binary is not needed for this test

Actual behavior

Unit test build gets failed on windows for packages mentioned in the issue title.
More details : #2562 (comment)

Expected behavior

Unit test should pass.

It could be a proposed solution : tektoncd/cli#191

Any logs, error output, etc?

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 25, 2020
@prietyc123 prietyc123 added the area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering label Feb 25, 2020
@girishramnani girishramnani added this to For consideration in Sprint 181 via automation Mar 9, 2020
@girishramnani girishramnani changed the title Skipping package testingutil and ui for unit test build on windows making package testingutil and ui work for unit test build on windows Mar 9, 2020
@prietyc123
Copy link
Contributor Author

This is getting affected on windows due to #2586

@prietyc123
Copy link
Contributor Author

prietyc123 commented Mar 19, 2020

testingutil and ui uses a pseudo terminal https://github.com/openshift/odo/blob/master/pkg/testingutil/survey_ui.go#L75 and which is executed by library github.com/Netflix/go-expect not supported on windows. AFAIF there is no similar library as github.com/Netflix/go-expect though we have an alternate way of doing this. We can replace github.com/kr/pty with github.com/creack/pty Refer - tektoncd/cli#191 . But unfortunately we don't have any option to replace it using glide. It can be done using replace in go mod.

Reason for build (https://travis-ci.com/github/openshift/odo/jobs/284808147) to get failed on windows in odo:

PS C:\Users\Admin\go\src\github.com\openshift\odo> go test -count=1 pkg/project/project.go pkg/project/project_test.go pkg/project/types.go
# github.com/openshift/odo/vendor/github.com/kr/pty
vendor\github.com\kr\pty\shim.go:26:16: undefined: pty.Winsize
vendor\github.com\kr\pty\shim.go:32:63: undefined: pty.Getsize
vendor\github.com\kr\pty\shim.go:38:9: undefined: pty.GetsizeFull
vendor\github.com\kr\pty\shim.go:47:52: undefined: pty.InheritSize
vendor\github.com\kr\pty\shim.go:57:54: undefined: pty.Setsize
vendor\github.com\kr\pty\shim.go:64:60: undefined: pty.Start
vendor\github.com\kr\pty\shim.go:75:9: undefined: pty.StartWithSize
FAIL    command-line-arguments [build failed]
FAIL

@kadel @girishramnani It would be great if you look into this and let me know if there is any suggestion for such use cases.

@girishramnani girishramnani added this to For consideration in Sprint 182 via automation Mar 30, 2020
@girishramnani girishramnani removed this from For consideration in Sprint 181 Mar 30, 2020
@girishramnani girishramnani moved this from For consideration to To do in Sprint 182 Mar 30, 2020
@girishramnani girishramnani moved this from To do to For review in Sprint 182 Mar 30, 2020
Sprint 182 automation moved this from For review to Done Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/bug Categorizes issue or PR as related to a bug.
Projects
No open projects
Sprint 182
  
Done
2 participants