[Test] Rework NodeJS Express devfile API test #23287
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Rework the NodeJS Express devfile API test regarding our previous strategy wich was implemented in the PHP devfile API test
Screenshot/screencast of this PR
`
✔ Create nodejs-express workspace (32858ms)
• startCommand - workdir from exec section of DevWorkspace file: ${PROJECTS_ROOT}/web-nodejs-sample/app
• startCommand - commandLine from exec section of DevWorkspace file: npm install
▼ ContainerTerminal.execInContainerCommand - oc
▼ ShellExecutor.executeCommand - oc exec -i pod/workspace005456e90bf44662-c6bf9d85f-575pc -n admin-devspaces -c tools -- sh -c 'cd ${PROJECTS_ROOT}/web-nodejs-sample/app && npm install'
npm warn old lockfile
npm warn old lockfile The package-lock.json file was created with an old version of npm,
npm warn old lockfile so supplemental metadata must be fetched from the registry.
npm warn old lockfile
npm warn old lockfile This is a one-time fix-up, please be patient...
npm warn old lockfile
added 50 packages, and audited 51 packages in 3s
7 vulnerabilities (3 low, 4 high)
To address all issues, run:
npm audit fix
Run
npm audit
for details.npm notice
npm notice New minor version of npm available! 10.8.1 -> 10.9.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.2
npm notice To update run: npm install -g [email protected]
npm notice
• startCommand - workdir from exec section of DevWorkspace file: ${PROJECTS_ROOT}/web-nodejs-sample/app
• startCommand - commandLine from exec section of DevWorkspace file: nodemon app.js
▼ ContainerTerminal.execInContainerCommandWithTimeout - oc
▼ ShellExecutor.executeCommand - timeout 20 oc exec -i pod/workspace005456e90bf44662-c6bf9d85f-575pc -n admin-devspaces -c tools -- sh -c 'cd ${PROJECTS_ROOT}/web-nodejs-sample/app && nodemon app.js'
[nodemon] 3.0.1
[nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting
node app.js
Example app listening on port 3000!
✔ Check running application
▼ KubernetesCommandLineToolsExecutor.deleteDevWorkspace - oc - delete 'nodejs-web-appf3bfa4cc' workspace
▼ ShellExecutor.executeCommand - oc patch dw nodejs-web-appf3bfa4cc -n admin-devspaces -p '{ "metadata": { "finalizers": null }}' --type merge || true
devworkspace.workspace.devfile.io/nodejs-web-appf3bfa4cc patched
▼ ShellExecutor.executeCommand - oc delete dw nodejs-web-appf3bfa4cc -n admin-devspaces || true
devworkspace.workspace.devfile.io "nodejs-web-appf3bfa4cc" deleted
▼ ShellExecutor.executeCommand - oc delete dwt che-code-nodejs-web-appf3bfa4cc -n admin-devspaces || true
Error from server (NotFound): devworkspacetemplates.workspace.devfile.io "che-code-nodejs-web-appf3bfa4cc" not found
What issues does this PR fix or reference?
https://issues.redhat.com/browse/CRW-7607
How to test this PR?
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.