CLI-179 add network test for install.sh script#121
CLI-179 add network test for install.sh script#121kirill-knize-sonarsource wants to merge 2 commits intomasterfrom
Conversation
SummaryAdds an end-to-end test for install.sh that validates the script works by actually downloading and installing the sonar CLI binary. This tests real network paths against binaries.sonarsource.com to ensure the URL structure is correct across platforms. Also updates CLAUDE.md to document the new E2E test suite. What reviewers should knowStart by reading the new test file
|
c8fe9bb to
a907112
Compare
| () => { | ||
| const scriptPath = join(scriptDir, 'install.sh'); | ||
|
|
||
| const scriptContent = readFileSync(scriptPath, 'utf-8'); |
There was a problem hiding this comment.
The test downloads the exact version hardcoded in install.sh (version="0.6.1.603", line 76). If install.sh is ever bumped to a new version number before that version's artifacts are published to binaries.sonarsource.com, this test will fail in CI with a 404 or download error.
Is there a CI ordering guarantee that CDN publish always precedes an install.sh version bump landing on the main branch? If not, consider whether the test should skip or be tagged separately from the standard integration suite when run against an unreleased version.
- Mark as noise
a907112 to
aab8578
Compare
aab8578 to
2db0c5d
Compare
damien-urruty-sonarsource
left a comment
There was a problem hiding this comment.
I think it's a good start, but I have couple of comments:
- how do you ensure the test is run only on linux/mac? If someone on Windows checks out the project, the test will fail
- I would maybe put this test in a separate folder, it's yet different than integration tests. Maybe
end-to-end, orinstall?
Also some more observations or nice-to-have:
- I think the test is doing the bare minimum, it's fine for now, we will probably include more tests soon
- At some point if we have more tests like this one, we could also build a "install tests harness", similar to what we have for integration tests. I can already see a lot of setup boilerplate can be factorized in a single place
8de2869 to
600e84b
Compare
SonarQube reviewer guide
|
damien-urruty-sonarsource
left a comment
There was a problem hiding this comment.
LGTM, do we need to create a separate ticket to test the Windows install script?




No description provided.