Repository navigation
#2576: fix cli tests failing on macOS - #2593
Conversation
Coverage Report for CI Build 38882049784Coverage decreased (-0.02%) to 74.759%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
laim2003
left a comment
There was a problem hiding this comment.
Thanks @shodiBoy1 for this test fix! Tested it on my mac and works perfectly fine. Just had a variable naming recommendation.
…positoryMock.java Co-authored-by: Lukas <luk.faber@gmx.de>
Thanks @laim2003 for the review. I've applied the recommendations. |
quando632
left a comment
There was a problem hiding this comment.
Thanks for the focused fix: resolving the expected path via FileAccess.toRealPath mirrors the production code, and assertInstalledVersion documents the bundle behaviour nicely.
Full cli suite is green on Windows, and a simulated MAC_X64 install runs through the new .dmg mock path.
…positoryMock.java Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
…positoryMock.java Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
This PR fixes #2576
Implemented changes:
CheckCommandletTest - On macOS,
/varis a symlink to/private/var.findRepositoryRootlogs the real path throughFileAccess.toRealPath. The test now builds the expected.gitignorepath the same way, so the warning line matches.InstallCommandletTest - The macOS Java fixtures end in
.dmg.FileAccess.compressonly builds tar and zip, so the mock could not create that archive.ToolRepositoryMocknow rewrites unsupported extensions to.tgzbefore compressing, which is the archive format the test infrastructure already uses.CveCheckInstallTest - On macOS,
software/intellijpoints intoIntelliJ IDEA CE.app/Contents/MacOS. The version file is written on the installation root, outside the bundle. The tests now read that file fromToolInstallation.rootDir()through one shared assertion.Testing instructions
clidirectory:mvn -Dtest=CheckCommandletTest,InstallCommandletTest,CveCheckInstallTest testmvn -q -ntp verify -pl '!documentation'clicommand..zipand.tgzfixture URLs are not rewritten, and a real.dmginstall still useshdiutil.Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.batand notfeature/921 fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internalpom.xmlfiles or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc