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

Skip some tests when running on Windows #4683

Merged
merged 1 commit into from
May 10, 2022

Conversation

antgamdia
Copy link
Contributor

Description of the change

Since I am temporarily running a Windows system, I've noticed that some of our tests are not ready to run there (asserting non-existing error messages, dealing with files and env vars, etc...), so, even we decrease the test coverage when running tests on windows, at least, we won't get consistently failing tests anymore.

Benefits

We will be able to run our test suite on Windows without false positives.

Possible drawbacks

Less coverage on Windows.

Applicable issues

N/A

Additional information

N/A

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@castelblanque
Copy link
Collaborator

castelblanque commented May 10, 2022

Is it a problem that we could tackle to make the tests pass in both OSs? I would expect the env variables to be handled OOB by Go, and being maybe the file paths being problematic. Is that something we could "fix" from our code base? e.g. Don't know about Go, but in Java there are variables for path separator (/ vs \) that are automatically set by the JVM.
However, given that it is about running tests in Windows...not a critical thing 😄

@antgamdia
Copy link
Contributor Author

Honestly, I don't know. I would have expected those differences to be handled by the go dependencies (like os.setEnv(..)), but unfortunately, there is something I'm missing. In the case of the env vars, I'd say the problem is that the value, once set, doesn't get persisted during the execution of the test.
In other scenarios, is just the error message of the expected error that is different from the expected in unix-based OSS. Also, when loading a plugin config, it seems to fail when opening a non-existent file and the test is not prepared to accept panics or fatals. So... a bunch of different problems 😅

But... as you pointed out, I just wanted to be able to run our test suite, especially now I was performing several clean-up PRs. Perhaps we can file an issue to track it, but as for now, I'm 100% for adding the proposed skip.

@castelblanque
Copy link
Collaborator

Ok, then there's too much to investigate here 😃
Agree leaving it with the skip for now.

@antgamdia antgamdia merged commit a5e1510 into vmware-tanzu:main May 10, 2022
@antgamdia antgamdia deleted the skip-tests-windows branch May 10, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants