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

Fix LogURI generation-related tests on Windows. #7569

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

aznashwan
Copy link
Contributor

Signed-off-by: Nashwan Azhari nazhari@cloudbasesolutions.com

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
@k8s-ci-robot
Copy link

Hi @aznashwan. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@aznashwan
Copy link
Contributor Author

aznashwan commented Oct 21, 2022

Context: this test was technically a false positive on all platforms as it was accidentally calling assert.Error() which simply checks whether the given error is != nil. (which it always was by the point assert.Error() was called, so none of the tests which yielded errors ever failed, regardless if the errors were expected or not)
Switching to assert.ErrorContains() should achieve the original purpose of the test.

Note that I have also added separate testcases for *nix and Windows as we use filepath.IsAbs() which only works on paths for the given platform we're running on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants