mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
Merge pull request #22903 from tspmelo/fix-e2e-script
mgr/dashboard: Fix e2e script Reviewed-by: Laura Paduano <lpaduano@suse.com> Reviewed-by: Tatjana Dehler <tdehler@suse.com>
This commit is contained in:
commit
ebbc3bc241
@ -54,7 +54,8 @@
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "ceph-dashboard:build"
|
||||
"browserTarget": "ceph-dashboard:build",
|
||||
"proxyConfig": "proxy.conf.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@ -141,4 +142,4 @@
|
||||
"prefix": "cd"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --proxy-config proxy.conf.json --host 0.0.0.0",
|
||||
"start": "ng serve --host 0.0.0.0",
|
||||
"build": "ng build",
|
||||
"test": "jest --watch",
|
||||
"test:ci": "jest --coverage",
|
||||
|
@ -44,19 +44,18 @@ if [ "$BASE_URL" == "" ]; then
|
||||
sleep 10
|
||||
|
||||
BASE_URL=`./bin/ceph mgr services | jq .dashboard`
|
||||
BASE_URL=${BASE_URL//\"}
|
||||
fi
|
||||
|
||||
cd $DASH_DIR/frontend
|
||||
jq '.["/api/"].target'=$BASE_URL proxy.conf.json.sample | jq '.["/ui-api/"].target'=$BASE_URL > proxy.conf.json
|
||||
. $BUILD_DIR/src/pybind/mgr/dashboard/node-env/bin/activate
|
||||
npm install
|
||||
npm run build -- --prod
|
||||
|
||||
if [ $DEVICE == "chrome" ]; then
|
||||
npm run e2e -- --serve=false --base-href $BASE_URL || stop
|
||||
npm run e2e || stop
|
||||
elif [ $DEVICE == "docker" ]; then
|
||||
docker run -d -v $(pwd):/workdir --net=host --name angular-e2e-container rogargon/angular-e2e || stop
|
||||
docker exec angular-e2e-container npm run e2e -- --serve=false --base-href $BASE_URL
|
||||
docker exec angular-e2e-container npm run e2e
|
||||
docker stop angular-e2e-container
|
||||
docker rm angular-e2e-container
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user