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 Windows path Issues in Coko tests #836

Merged
merged 5 commits into from
Apr 3, 2024
Merged

Conversation

CodingDepot
Copy link
Collaborator

Using the Path constructor with the absolute Windows paths we get from the classLoader leads to an InvalidPathException.

The reason for this is that the absolute path starts with a / in front of the drive name (C: or similar), which leads to the : being marked as an invalid character.

Using URL.toURI().toPath() instead of Path(URL.path) circumvents this issue.

@CodingDepot CodingDepot added the bug Something isn't working label Apr 3, 2024
@CodingDepot CodingDepot requested a review from fwendland April 3, 2024 09:58
@CodingDepot CodingDepot self-assigned this Apr 3, 2024
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.67%. Comparing base (7079558) to head (0122168).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #836   +/-   ##
=========================================
  Coverage     81.67%   81.67%           
  Complexity      178      178           
=========================================
  Files            49       49           
  Lines          1370     1370           
  Branches        189      189           
=========================================
  Hits           1119     1119           
  Misses          158      158           
  Partials         93       93           
Flag Coverage Δ
unittests 81.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fwendland fwendland merged commit 0cd0f2e into main Apr 3, 2024
6 checks passed
@fwendland fwendland deleted the rh/windows-test-fix branch April 3, 2024 14:02
fwendland added a commit that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants