-
Notifications
You must be signed in to change notification settings - Fork 190
fix: Fix npm relative folder and tests #22857
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
Conversation
Fix relative path for npm-cli Validate found alternative node Remove validate npm as the faulty version 6.0 should never be installed.
| // Running npm using node and npm-cli.js script by default | ||
| assertEquals(5, tools.getNpmExecutable().size()); | ||
| assertThat(tools.getNpmExecutable().get(0), containsString("node")); | ||
| assertThat(tools.getNpmExecutable().get(1), containsString("npm")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question: wasn't the goal of the test to verify that global node and npm executables are used instead of stuff installed by Flow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like some tests fail on Bender with these changes
TaskRunNpmInstallTest.runNpmInstall_vaadinHomeNodeIsAFolder_throws
java.lang.AssertionError: Expected test to throw exception with message a string containing "it's either not a file or not a 'node' executable."
TaskRunPnpmInstallTest.runNpmInstall_vaadinHomeNodeIsAFolder_throws
java.lang.AssertionError: Expected test to throw exception with message a string containing "it's either not a file or not a 'node' executable."
FrontendToolsTest.homeNodeIsNotForced_useGlobalNode
java.lang.AssertionError:
Expected: not a string containing "/tmp/junit3521848545615054060/junit3043236432058057772"
but: was "/tmp/junit3521848545615054060/junit3043236432058057772/node-v24.10.0/bin/node"
java.lang.AssertionError:
Expected: not a string containing "/tmp/junit3521848545615054060/junit3043236432058057772"
but: was "/tmp/junit3521848545615054060/junit3043236432058057772/node-v24.10.0/bin/node"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Must have mixed the methods as the one before is force alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed throws tests as we install on problem and do not throw anymore.
Reverted the global folder check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there's still something not working properly. On Bender there's global node v24.11.0 installed, but Flow seems to install v24.10.0 anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. So problematic as there is no clear indication what is happening as all tests pass locally. Will try with some log out for the global test.
Also the reinstallations are not happening it seems for the directory on bender.
Fix throws test to expect reinstall of node instead
and they could clash on the CI as a system property is set.
move main method from test class to own executor class
b493bf8 to
7a54ca0
Compare
7a54ca0 to
69989fb
Compare
86ea9fd to
8067aff
Compare
8067aff to
19d40f4
Compare
and the other one doesn't
|
|
This ticket/PR has been released with Vaadin 25.0.0-beta9. |



Fix relative path for npm-cli
Validate found alternative node
Remove validate npm as the faulty
version 6.0 should never be installed.