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

Replaced npm install with npm ci appropriately #20927

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
**Perform commands:**

- ```export TS_SELENIUM_BASE_URL=<Che7 URL>```
- ```npm install```
- ```npm ci```

Note: If there is any modifications in package.json, manually execute the `npm install` to update the package-lock.json. So that errors can be avoided while executing npm ci

## Default launch

Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/build/dockerfiles/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ done
if mount | grep 'e2e' && ! mount | grep 'e2e/report'; then
echo "The local code is mounted. Executing local code."
cd /tmp/e2e || exit
npm install
npm ci
else
echo "Executing e2e tests from an image."
cd /tmp/e2e || exit
Expand All @@ -85,13 +85,13 @@ if [ $TS_LOAD_TESTS ]; then
echo "Tarring files and sending them via FTP..."
tar -cf $user_folder.tar ./$user_folder

ftp -vn load-tests-ftp-service << End_script
ftp -vn load-tests-ftp-service << End_script
user user pass1234
binary
put $user_folder.tar
quit
End_script

echo "Files sent to load-tests-ftp-service."
else
SCREEN_RECORDING=${VIDEO_RECORDING:-true}
Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/initDevfileTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ launchAllUserstories(){
echo ""
echo "Launching all userstories";
echo ""
npm run lint && npm run tsc && mocha --opts mocha-all-devfiles.opts ;

npm run lint && npm run tsc && mocha --config mocha-all-devfiles.json ;
}

launchSingleUserstory(){
echo ""
echo "Launching the \"${USERSTORY}\" userstory";
echo ""
tsc && mocha --opts mocha-single-devfile.opts --spec dist/tests/login/Login.spec.js --spec dist/tests/devfiles/${USERSTORY}.spec.js ;

tsc && mocha --config mocha-single-devfile.json --spec dist/tests/login/Login.spec.js --spec dist/tests/devfiles/${USERSTORY}.spec.js ;
}

checkUserstoryName(){
local checkedName="$(ls tests/devfiles | grep ${USERSTORY}.spec.ts)";

if [ -z "$checkedName" ]; then
echo ""
echo "Current value USERSTORY=\"${USERSTORY}\" doesn't match to any existed test:"
Expand All @@ -31,7 +31,7 @@ checkUserstoryName(){
echo ""
echo "Please choose one of the tests above, or unset the \"USERSTORY\" variable for launching all of them."
echo ""

exit 1;
fi
}
Expand Down