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

Fixes watch unit tests for windows #2692

Merged

Conversation

mik-dass
Copy link
Contributor

@mik-dass mik-dass commented Mar 9, 2020

What type of PR is this?

/kind bug

What does does this PR do / why we need it:

It removes the unit tests requiring the survey package and fixes the watch unit tests for windows.

Which issue(s) this PR fixes:

Fixes #2570 (windows part)

How to test changes / Special notes to the reviewer:

  • add // +build !windows to testing\survey_ui.go and odo\cli\service\service_test.go
  • run the watch tests on windows

@codecov
Copy link

codecov bot commented Mar 9, 2020

Codecov Report

Merging #2692 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2692      +/-   ##
==========================================
+ Coverage   43.87%   43.92%   +0.04%     
==========================================
  Files          82       86       +4     
  Lines        7581     7757     +176     
==========================================
+ Hits         3326     3407      +81     
- Misses       3931     4015      +84     
- Partials      324      335      +11
Impacted Files Coverage Δ
pkg/odo/cli/catalog/util/util.go 40.47% <0%> (-18.15%) ⬇️
pkg/kclient/generators.go 90.78% <0%> (-9.22%) ⬇️
...g/devfile/adapters/kubernetes/component/adapter.go 69.35% <0%> (-5.65%) ⬇️
pkg/kclient/kclient.go 26.92% <0%> (-3.52%) ⬇️
pkg/kclient/volumes.go 93.22% <0%> (-1.66%) ⬇️
pkg/testingutil/devfile.go 0% <0%> (ø) ⬆️
pkg/kclient/fakeclient.go 100% <0%> (ø) ⬆️
pkg/devfile/adapters/common/utils.go 100% <0%> (ø)
pkg/devfile/adapters/kubernetes/storage/utils.go 66.07% <0%> (ø)
pkg/kclient/operators.go 0% <0%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1edac87...c2507d1. Read the comment docs.

@amitkrout
Copy link
Contributor

@mrinal i do not see any unit test failure even after executing make test 20 time on macOS.

$ for i in $(seq 1 20); do go test -count=1 /Users/amit/go/src/github.com/openshift/odo/pkg/debug; done
ok      github.com/openshift/odo/pkg/debug      0.057s
ok      github.com/openshift/odo/pkg/debug      0.050s
ok      github.com/openshift/odo/pkg/debug      0.050s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.048s
ok      github.com/openshift/odo/pkg/debug      0.046s
ok      github.com/openshift/odo/pkg/debug      0.050s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.048s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.049s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.048s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.046s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.048s
ok      github.com/openshift/odo/pkg/debug      0.047s
ok      github.com/openshift/odo/pkg/debug      0.048s

Also can you please update the windows thing just we discussed in triage call so that i can test it on windows too.

@mik-dass
Copy link
Contributor Author

mik-dass commented Mar 9, 2020

@mrinal i do not see any unit test failure even after executing make test 20 time on macOS.

Please try it at least 100 times, just to be extra sure :D

Also can you please update the windows thing just we discussed in triage call so that i can test it on windows too.

Done

@amitkrout
Copy link
Contributor

amitkrout commented Mar 10, 2020

@mrinal i do not see any unit test failure even after executing make test 20 time on macOS.

It was passing because i was passing wrong package name :(. After correcting the script i hit the same flake. Also surprisingly i am also hitting same flake through make test in the first run.

$ make test
go test  -race github.com/openshift/odo/cmd/cli-doc github.com/openshift/odo/cmd/odo github.com/openshift/odo/pkg/application github.com/openshift/odo/pkg/application/labels github.com/openshift/odo/pkg/auth github.com/openshift/odo/pkg/catalog github.com/openshift/odo/pkg/component github.com/openshift/odo/pkg/component/labels github.com/openshift/odo/pkg/config github.com/openshift/odo/pkg/debug github.com/openshift/odo/pkg/devfile github.com/openshift/odo/pkg/devfile/adapters github.com/openshift/odo/pkg/devfile/adapters/common github.com/openshift/odo/pkg/devfile/adapters/kubernetes github.com/openshift/odo/pkg/devfile/adapters/kubernetes/component github.com/openshift/odo/pkg/devfile/adapters/kubernetes/utils github.com/openshift/odo/pkg/devfile/parser github.com/openshift/odo/pkg/devfile/versions github.com/openshift/odo/pkg/devfile/versions/1.0.0 github.com/openshift/odo/pkg/devfile/versions/common github.com/openshift/odo/pkg/envinfo github.com/openshift/odo/pkg/kclient github.com/openshift/odo/pkg/log github.com/openshift/odo/pkg/log/fidget github.com/openshift/odo/pkg/machineoutput github.com/openshift/odo/pkg/notify github.com/openshift/odo/pkg/occlient github.com/openshift/odo/pkg/odo/cli github.com/openshift/odo/pkg/odo/cli/application github.com/openshift/odo/pkg/odo/cli/catalog github.com/openshift/odo/pkg/odo/cli/catalog/describe github.com/openshift/odo/pkg/odo/cli/catalog/list github.com/openshift/odo/pkg/odo/cli/catalog/search github.com/openshift/odo/pkg/odo/cli/catalog/util github.com/openshift/odo/pkg/odo/cli/component github.com/openshift/odo/pkg/odo/cli/component/ui github.com/openshift/odo/pkg/odo/cli/config github.com/openshift/odo/pkg/odo/cli/debug github.com/openshift/odo/pkg/odo/cli/login github.com/openshift/odo/pkg/odo/cli/logout github.com/openshift/odo/pkg/odo/cli/preference github.com/openshift/odo/pkg/odo/cli/project github.com/openshift/odo/pkg/odo/cli/service github.com/openshift/odo/pkg/odo/cli/service/ui github.com/openshift/odo/pkg/odo/cli/storage github.com/openshift/odo/pkg/odo/cli/ui github.com/openshift/odo/pkg/odo/cli/url github.com/openshift/odo/pkg/odo/cli/utils github.com/openshift/odo/pkg/odo/cli/version github.com/openshift/odo/pkg/odo/genericclioptions github.com/openshift/odo/pkg/odo/util github.com/openshift/odo/pkg/odo/util/completion github.com/openshift/odo/pkg/odo/util/experimental github.com/openshift/odo/pkg/odo/util/pushtarget github.com/openshift/odo/pkg/odo/util/validation github.com/openshift/odo/pkg/preference github.com/openshift/odo/pkg/project github.com/openshift/odo/pkg/secret github.com/openshift/odo/pkg/service github.com/openshift/odo/pkg/storage github.com/openshift/odo/pkg/storage/labels github.com/openshift/odo/pkg/sync github.com/openshift/odo/pkg/testingutil github.com/openshift/odo/pkg/testingutil/filesystem github.com/openshift/odo/pkg/url github.com/openshift/odo/pkg/url/labels github.com/openshift/odo/pkg/util github.com/openshift/odo/pkg/version
?       github.com/openshift/odo/cmd/cli-doc    [no test files]
?       github.com/openshift/odo/cmd/odo        [no test files]
ok      github.com/openshift/odo/pkg/application        1.191s
ok      github.com/openshift/odo/pkg/application/labels 1.020s
?       github.com/openshift/odo/pkg/auth       [no test files]
ok      github.com/openshift/odo/pkg/catalog    1.152s
E0310 07:16:42.053553   17947 watch.go:183] Failed getting details of the changed file /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis337730513/tests796006443/test_read_licenses.py322946294. Ignoring the change
E0310 07:16:42.056583   17947 watch.go:189] Ignoring event for file /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis337730513/tests796006443/test_read_licenses.py322946294 as details about the file couldn't be fetched
E0310 07:16:49.086236   17947 watch.go:183] Failed getting details of the changed file /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis973840565/tests528669871/test_read_licenses.py787525162. Ignoring the change
E0310 07:16:49.086302   17947 watch.go:189] Ignoring event for file /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis973840565/tests528669871/test_read_licenses.py787525162 as details about the file couldn't be fetched
--- FAIL: TestWatchAndPush (13.05s)
    watch_test.go:691: Running test:  Case 1: Valid watch with list of files to be ignored with a append event
    watch_test.go:691: Running test:  Case 2: Valid watch with list of files to be ignored with a append and a delete event
    watch_test.go:691: Running test:  Case 3: Valid watch with list of files to be ignored with a create and a delete event
    --- FAIL: TestWatchAndPush/Case_3:_Valid_watch_with_list_of_files_to_be_ignored_with_a_create_and_a_delete_event (1.01s)
        watch_test.go:715: Done with basePath creation and client init will trigger WatchAndPush and file modifications next...
            map[.git:{FilePath:.git604100806 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:1 ModificationType:create} LICENSE:{FilePath:LICENSE538705773 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:0 ModificationType:create} src:{FilePath:src595254132 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:1 ModificationType:create} src/__init__.py:{FilePath:__init__.py062084584 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/src595254132 FileType:0 ModificationType:create} src/main.py:{FilePath:main.py982478375 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/src595254132 FileType:0 ModificationType:create} src/read_licenses.py:{FilePath:read_licenses.py101774236 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/src595254132 FileType:0 ModificationType:create} tests:{FilePath:tests176556611 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:1 ModificationType:create} tests/__init__.py:{FilePath:__init__.py162492762 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/tests176556611 FileType:0 ModificationType:create} tests/test1.py:{FilePath:test1.py756141809 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/tests176556611 FileType:0 ModificationType:create}]
        watch_test.go:764: Starting WatchAndPush now
        watch_test.go:718: Starting file simulations 
            [{FilePath:__init__.py FileParent: FileType:0 ModificationType:create} {FilePath:read_licenses.py FileParent:src FileType:0 ModificationType:delete} {FilePath:test_read_licenses.py FileParent:tests FileType:0 ModificationType:create} {FilePath:tests FileParent: FileType:1 ModificationType:delete}]
        watch_test.go:755: The CompDirStructure is 
            map[.git:{FilePath:.git604100806 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:1 ModificationType:create} LICENSE:{FilePath:LICENSE538705773 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:0 ModificationType:create} __init__.py:{FilePath:__init__.py213526603 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:1 ModificationType:create} src:{FilePath:src595254132 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:1 ModificationType:create} src/__init__.py:{FilePath:__init__.py062084584 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/src595254132 FileType:0 ModificationType:create} src/main.py:{FilePath:main.py982478375 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/src595254132 FileType:0 ModificationType:create} src/read_licenses.py:{FilePath:read_licenses.py101774236 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/src595254132 FileType:0 ModificationType:create} tests:{FilePath:tests176556611 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313 FileType:1 ModificationType:create} tests/__init__.py:{FilePath:__init__.py162492762 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/tests176556611 FileType:0 ModificationType:create} tests/test1.py:{FilePath:test1.py756141809 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/tests176556611 FileType:0 ModificationType:create} tests/test_read_licenses.py:{FilePath:test_read_licenses.py623118126 FileParent:/var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/tests176556611 FileType:1 ModificationType:create}]
        watch_test.go:781: error in WatchAndPush error watching filesystem for changes: open /var/folders/c9/fb55pf_568dfd1fzj9w1v4n00000gn/T/fabric8-analytics-license-analysis936438313/tests176556611: no such file or directory
    watch_test.go:691: Running test:  Case 4: Valid watch with list of files to be ignored with a folder create event
    watch_test.go:691: Running test:  Case 5: Valid watch with list of files to be ignored with a folder delete event
FAIL
FAIL    github.com/openshift/odo/pkg/component  13.242s
ok      github.com/openshift/odo/pkg/component/labels   1.019s
ok      github.com/openshift/odo/pkg/config     1.105s
ok      github.com/openshift/odo/pkg/debug      1.212s
ok      github.com/openshift/odo/pkg/devfile    1.056s
ok      github.com/openshift/odo/pkg/devfile/adapters   1.070s
?       github.com/openshift/odo/pkg/devfile/adapters/common    [no test files]
?       github.com/openshift/odo/pkg/devfile/adapters/kubernetes        [no test files]
ok      github.com/openshift/odo/pkg/devfile/adapters/kubernetes/component      1.095s
?       github.com/openshift/odo/pkg/devfile/adapters/kubernetes/utils  [no test files]
ok      github.com/openshift/odo/pkg/devfile/parser     1.083s
ok      github.com/openshift/odo/pkg/devfile/versions   1.020s
?       github.com/openshift/odo/pkg/devfile/versions/1.0.0     [no test files]
?       github.com/openshift/odo/pkg/devfile/versions/common    [no test files]
ok      github.com/openshift/odo/pkg/envinfo    1.055s
ok      github.com/openshift/odo/pkg/kclient    1.090s
?       github.com/openshift/odo/pkg/log        [no test files]
?       github.com/openshift/odo/pkg/log/fidget [no test files]
?       github.com/openshift/odo/pkg/machineoutput      [no test files]
ok      github.com/openshift/odo/pkg/notify     1.053s [no tests to run]
ok      github.com/openshift/odo/pkg/occlient   4.271s
?       github.com/openshift/odo/pkg/odo/cli    [no test files]
?       github.com/openshift/odo/pkg/odo/cli/application        [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog    [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog/describe   [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog/list       [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog/search     [no test files]
ok      github.com/openshift/odo/pkg/odo/cli/catalog/util       1.195s
?       github.com/openshift/odo/pkg/odo/cli/component  [no test files]
?       github.com/openshift/odo/pkg/odo/cli/component/ui       [no test files]
?       github.com/openshift/odo/pkg/odo/cli/config     [no test files]
?       github.com/openshift/odo/pkg/odo/cli/debug      [no test files]
?       github.com/openshift/odo/pkg/odo/cli/login      [no test files]
?       github.com/openshift/odo/pkg/odo/cli/logout     [no test files]
?       github.com/openshift/odo/pkg/odo/cli/preference [no test files]
?       github.com/openshift/odo/pkg/odo/cli/project    [no test files]
ok      github.com/openshift/odo/pkg/odo/cli/service    1.099s
ok      github.com/openshift/odo/pkg/odo/cli/service/ui 1.149s
ok      github.com/openshift/odo/pkg/odo/cli/storage    1.119s
?       github.com/openshift/odo/pkg/odo/cli/ui [no test files]
?       github.com/openshift/odo/pkg/odo/cli/url        [no test files]
ok      github.com/openshift/odo/pkg/odo/cli/utils      1.119s
?       github.com/openshift/odo/pkg/odo/cli/version    [no test files]
?       github.com/openshift/odo/pkg/odo/genericclioptions      [no test files]
ok      github.com/openshift/odo/pkg/odo/util   1.104s
ok      github.com/openshift/odo/pkg/odo/util/completion        1.137s
ok      github.com/openshift/odo/pkg/odo/util/experimental      1.051s
ok      github.com/openshift/odo/pkg/odo/util/pushtarget        1.047s
ok      github.com/openshift/odo/pkg/odo/util/validation        1.039s
ok      github.com/openshift/odo/pkg/preference 1.058s
ok      github.com/openshift/odo/pkg/project    1.114s
ok      github.com/openshift/odo/pkg/secret     1.113s
ok      github.com/openshift/odo/pkg/service    1.100s
ok      github.com/openshift/odo/pkg/storage    1.116s
ok      github.com/openshift/odo/pkg/storage/labels     1.022s
?       github.com/openshift/odo/pkg/sync       [no test files]
ok      github.com/openshift/odo/pkg/testingutil        1.057s
?       github.com/openshift/odo/pkg/testingutil/filesystem     [no test files]
ok      github.com/openshift/odo/pkg/url        1.098s
ok      github.com/openshift/odo/pkg/url/labels 1.021s
ok      github.com/openshift/odo/pkg/util       1.519s
?       github.com/openshift/odo/pkg/version    [no test files]
FAIL
make: *** [test] Error 1
Amits-MacBook-Pro:odo amit$

@amitkrout
Copy link
Contributor

amitkrout commented Mar 10, 2020

@mik-dass seems your fix does not work properly on Windows. Note, i used cygwin terminal

See the failure logs

$ make test
go test  -race github.com/openshift/odo/cmd/cli-doc github.com/openshift/odo/cmd/odo github.com/opens
hift/odo/pkg/application github.com/openshift/odo/pkg/application/labels github.com/openshift/odo/pkg
/auth github.com/openshift/odo/pkg/catalog github.com/openshift/odo/pkg/component github.com/openshif
t/odo/pkg/component/labels github.com/openshift/odo/pkg/config github.com/openshift/odo/pkg/debug git
hub.com/openshift/odo/pkg/devfile github.com/openshift/odo/pkg/devfile/adapters github.com/openshift/
odo/pkg/devfile/adapters/common github.com/openshift/odo/pkg/devfile/adapters/kubernetes github.com/o
penshift/odo/pkg/devfile/adapters/kubernetes/component github.com/openshift/odo/pkg/devfile/adapters/
kubernetes/utils github.com/openshift/odo/pkg/devfile/parser github.com/openshift/odo/pkg/devfile/ver
sions github.com/openshift/odo/pkg/devfile/versions/1.0.0 github.com/openshift/odo/pkg/devfile/versio
ns/common github.com/openshift/odo/pkg/envinfo github.com/openshift/odo/pkg/kclient github.com/opensh
ift/odo/pkg/log github.com/openshift/odo/pkg/log/fidget github.com/openshift/odo/pkg/machineoutput gi
thub.com/openshift/odo/pkg/notify github.com/openshift/odo/pkg/occlient github.com/openshift/odo/pkg/
odo/cli github.com/openshift/odo/pkg/odo/cli/application github.com/openshift/odo/pkg/odo/cli/catalog
 github.com/openshift/odo/pkg/odo/cli/catalog/describe github.com/openshift/odo/pkg/odo/cli/catalog/l
ist github.com/openshift/odo/pkg/odo/cli/catalog/search github.com/openshift/odo/pkg/odo/cli/catalog/
util github.com/openshift/odo/pkg/odo/cli/component github.com/openshift/odo/pkg/odo/cli/component/ui
 github.com/openshift/odo/pkg/odo/cli/config github.com/openshift/odo/pkg/odo/cli/debug github.com/op
enshift/odo/pkg/odo/cli/login github.com/openshift/odo/pkg/odo/cli/logout github.com/openshift/odo/pk
g/odo/cli/preference github.com/openshift/odo/pkg/odo/cli/project github.com/openshift/odo/pkg/odo/cl
i/service github.com/openshift/odo/pkg/odo/cli/service/ui github.com/openshift/odo/pkg/odo/cli/storag
e github.com/openshift/odo/pkg/odo/cli/ui github.com/openshift/odo/pkg/odo/cli/url github.com/openshift/odo/pkg/odo/cli/utils github.com/openshift/odo/pkg/odo/cli/version github.com/openshift/odo/pkg/od
o/genericclioptions github.com/openshift/odo/pkg/odo/util github.com/openshift/odo/pkg/odo/util/compl
etion github.com/openshift/odo/pkg/odo/util/experimental github.com/openshift/odo/pkg/odo/util/pushta
rget github.com/openshift/odo/pkg/odo/util/validation github.com/openshift/odo/pkg/preference github.
com/openshift/odo/pkg/project github.com/openshift/odo/pkg/secret github.com/openshift/odo/pkg/servic
e github.com/openshift/odo/pkg/storage github.com/openshift/odo/pkg/storage/labels github.com/openshi
ft/odo/pkg/sync github.com/openshift/odo/pkg/testingutil github.com/openshift/odo/pkg/testingutil/fil
esystem github.com/openshift/odo/pkg/url github.com/openshift/odo/pkg/url/labels github.com/openshift
/odo/pkg/util github.com/openshift/odo/pkg/version
?       github.com/openshift/odo/cmd/cli-doc    [no test files]
?       github.com/openshift/odo/cmd/odo        [no test files]
ok      github.com/openshift/odo/pkg/application        (cached)
ok      github.com/openshift/odo/pkg/application/labels (cached)
?       github.com/openshift/odo/pkg/auth       [no test files]
ok      github.com/openshift/odo/pkg/catalog    (cached)
ok      github.com/openshift/odo/pkg/component  (cached)
ok      github.com/openshift/odo/pkg/component/labels   (cached)
ok      github.com/openshift/odo/pkg/config     (cached)
--- FAIL: Test_getDebugInfo (0.03s)
    --- FAIL: Test_getDebugInfo/case_3:_debug_port_not_listening (0.00s)
        info_test.go:314: getDebugInfo() got = {{OdoDebugInfo v1} 10972 testing-1 app nodejs-ex 5858
9001}, want {{ } 0    0 0}
        info_test.go:317: getDebugInfo() got1 = true, want false
    --- FAIL: Test_getDebugInfo/case_4:_the_process_is_not_running (0.00s)
        info_test.go:301: error while starting fake port listerner, cause: listen tcp 127.0.0.1:9001:
 bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
FAIL
FAIL    github.com/openshift/odo/pkg/debug      0.442s
ok      github.com/openshift/odo/pkg/devfile    (cached)
ok      github.com/openshift/odo/pkg/devfile/adapters   (cached)
?       github.com/openshift/odo/pkg/devfile/adapters/common    [no test files]
?       github.com/openshift/odo/pkg/devfile/adapters/kubernetes        [no test files]
ok      github.com/openshift/odo/pkg/devfile/adapters/kubernetes/component      (cached)
?       github.com/openshift/odo/pkg/devfile/adapters/kubernetes/utils  [no test files]
ok      github.com/openshift/odo/pkg/devfile/parser     (cached)
ok      github.com/openshift/odo/pkg/devfile/versions   (cached)
?       github.com/openshift/odo/pkg/devfile/versions/1.0.0     [no test files]
?       github.com/openshift/odo/pkg/devfile/versions/common    [no test files]
ok      github.com/openshift/odo/pkg/envinfo    (cached)
ok      github.com/openshift/odo/pkg/kclient    (cached)
?       github.com/openshift/odo/pkg/log        [no test files]
?       github.com/openshift/odo/pkg/log/fidget [no test files]
?       github.com/openshift/odo/pkg/machineoutput      [no test files]
ok      github.com/openshift/odo/pkg/notify     (cached) [no tests to run]
# 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
 V  Waiting for component to start [1ms]
 X  Waiting for component to start [0ns]
 X  Waiting for component to start [0ns]
--- FAIL: TestIsSubDir (0.00s)
    --- FAIL: TestIsSubDir/Case_5:_other_dir_same_prefix_more_complex_matching (0.00s)
        occlient_test.go:5373: the outcome for /abcde/fg and /abcde/fg/h is not expected
    --- FAIL: TestIsSubDir/Case_6:_dirs_with_.. (0.00s)
        occlient_test.go:5373: the outcome for /abcde/fg/../h and /abcde/h/ij is not expected
FAIL
FAIL    github.com/openshift/odo/pkg/occlient   3.831s
?       github.com/openshift/odo/pkg/odo/cli    [no test files]
?       github.com/openshift/odo/pkg/odo/cli/application        [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog    [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog/describe   [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog/list       [no test files]
?       github.com/openshift/odo/pkg/odo/cli/catalog/search     [no test files]
ok      github.com/openshift/odo/pkg/odo/cli/catalog/util       (cached)
?       github.com/openshift/odo/pkg/odo/cli/component  [no test files]
?       github.com/openshift/odo/pkg/odo/cli/component/ui       [no test files]
?       github.com/openshift/odo/pkg/odo/cli/config     [no test files]
?       github.com/openshift/odo/pkg/odo/cli/debug      [no test files]
?       github.com/openshift/odo/pkg/odo/cli/login      [no test files]
?       github.com/openshift/odo/pkg/odo/cli/logout     [no test files]
?       github.com/openshift/odo/pkg/odo/cli/preference [no test files]
?       github.com/openshift/odo/pkg/odo/cli/project    [no test files]
ok      github.com/openshift/odo/pkg/odo/cli/service    (cached)
FAIL    github.com/openshift/odo/pkg/odo/cli/service/ui [build failed]
ok      github.com/openshift/odo/pkg/odo/cli/storage    (cached)
?       github.com/openshift/odo/pkg/odo/cli/ui [no test files]
?       github.com/openshift/odo/pkg/odo/cli/url        [no test files]
ok      github.com/openshift/odo/pkg/odo/cli/utils      (cached)
?       github.com/openshift/odo/pkg/odo/cli/version    [no test files]
?       github.com/openshift/odo/pkg/odo/genericclioptions      [no test files]
ok      github.com/openshift/odo/pkg/odo/util   (cached)
ok      github.com/openshift/odo/pkg/odo/util/completion        (cached)
ok      github.com/openshift/odo/pkg/odo/util/experimental      (cached)
ok      github.com/openshift/odo/pkg/odo/util/pushtarget        (cached)
ok      github.com/openshift/odo/pkg/odo/util/validation        (cached)
ok      github.com/openshift/odo/pkg/preference (cached)
ok      github.com/openshift/odo/pkg/project    (cached)
ok      github.com/openshift/odo/pkg/secret     (cached)
ok      github.com/openshift/odo/pkg/service    (cached)
ok      github.com/openshift/odo/pkg/storage    (cached)
ok      github.com/openshift/odo/pkg/storage/labels     (cached)
?       github.com/openshift/odo/pkg/sync       [no test files]
ok      github.com/openshift/odo/pkg/testingutil        (cached)
?       github.com/openshift/odo/pkg/testingutil/filesystem     [no test files]
ok      github.com/openshift/odo/pkg/url        (cached)
ok      github.com/openshift/odo/pkg/url/labels (cached)
--- FAIL: TestGetAbsGlobExps (0.00s)
    --- FAIL: TestGetAbsGlobExps/test_case_1:_with_a_filename (0.00s)
        util_test.go:811: expected [/home/redhat/nodejs-ex/example.txt], got [\home\redhat\nodejs-ex\
example.txt]
    --- FAIL: TestGetAbsGlobExps/test_case_2:_with_a_folder_name (0.00s)
        util_test.go:811: expected [/home/redhat/nodejs-ex/example], got [\home\redhat\nodejs-ex\exam
ple]
--- FAIL: TestRemoveRelativePathFromFiles (0.00s)
    --- FAIL: TestRemoveRelativePathFromFiles/Case_1_-_Remove_the_relative_path_from_a_list_of_files
(0.00s)
        util_test.go:1126: expected [1 2 3 4/5/foo/bar], got [1 2 3 4\5\foo\bar]
FAIL
FAIL    github.com/openshift/odo/pkg/util       0.218s
?       github.com/openshift/odo/pkg/version    [no test files]
FAIL
make: *** [test] Error 2

@mik-dass
Copy link
Contributor Author

@amit those errors will be fixed with #2562

@amitkrout
Copy link
Contributor

@amit those errors will be fixed with #2562

yes, you are right.
So holding it till #2562 merge in.
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Mar 10, 2020
@prietyc123
Copy link
Contributor

@amit those errors will be fixed with #2562

#2562 got merged and I ran watch test on windows locally. I am not able to see any failure from watch test but as I stated earlier we were getting some failure in debug file because of watch, which is still there I guess. I have mentioned the logs output below:

$ make test
go test  -race github.com/openshift/odo/cmd/cli-doc github.com/openshift/odo/cmd/odo github.com/opens
hift/odo/pkg/application github.com/openshift/odo/pkg/application/labels github.com/openshift/odo/pkg
/auth github.com/openshift/odo/pkg/catalog github.com/openshift/odo/pkg/component 
[...]
?       github.com/openshift/odo/cmd/cli-doc    [no test files]
?       github.com/openshift/odo/cmd/odo        [no test files]
ok      github.com/openshift/odo/pkg/application        1.878s
ok      github.com/openshift/odo/pkg/application/labels (cached)
?       github.com/openshift/odo/pkg/auth       [no test files]
ok      github.com/openshift/odo/pkg/catalog    1.399s
ok      github.com/openshift/odo/pkg/component  1.486s
ok      github.com/openshift/odo/pkg/component/labels   (cached)
ok      github.com/openshift/odo/pkg/config     1.576s
--- FAIL: Test_getDebugInfo (0.03s)
    --- FAIL: Test_getDebugInfo/case_3:_debug_port_not_listening (0.00s)
        info_test.go:315: getDebugInfo() got = {{OdoDebugInfo v1} 10648 testing-1 app nodejs-ex 5858
9001}, want {{ } 0    0 0}
        info_test.go:318: getDebugInfo() got1 = true, want false
FAIL
FAIL    github.com/openshift/odo/pkg/debug      0.345s
ok      github.com/openshift/odo/pkg/devfile    1.166s
[...]
FAIL
make: *** [test] Error 1

AFAIR when the watch test was skipped we were not getting this failure anymore on windows. So there is a strong probability of this failure reason to be watch test. @mik-dass can you please have a look on this and correct me if I am wrong :)

@mik-dass
Copy link
Contributor Author

mik-dass commented Mar 11, 2020

@prietyc123 That's a different flake error occurring in debug tests. I have a raised a separate PR for this flake #2702

AFAIR when the watch test was skipped we were not getting this failure anymore on windows. So there is a strong probability of this failure reason to be watch test. @mik-dass can you please have a
look on this and correct me if I am wrong :)

I am not seeing this PR on the Travis CI. Thus I think this is a flake in the debug test.

@girishramnani
Copy link
Contributor

/retest

@girishramnani
Copy link
Contributor

/approve
/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Mar 12, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: girishramnani

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Mar 12, 2020
@prietyc123
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Mar 12, 2020
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

Removes the unit tests requiring the survey package from windows runtime.

Signed-off-by: mik-dass <mrinald7@gmail.com>
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Mar 12, 2020
@mik-dass
Copy link
Contributor Author

/retest

@prietyc123
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Mar 16, 2020
@openshift-merge-robot openshift-merge-robot merged commit 57756ed into redhat-developer:master Mar 16, 2020
@mik-dass mik-dass deleted the win_watch_fix branch March 16, 2020 11:41
@rm3l rm3l added the estimated-size/XS (1-5) Rough sizing for Epics. Less than one sprint of work for one person, but smaller than S. label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. estimated-size/XS (1-5) Rough sizing for Epics. Less than one sprint of work for one person, but smaller than S. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FLAKE]make test fails on osx and windows in travis CI
8 participants