mirror of https://github.com/apache/superset.git
chore: update port that cypress runs on for local vs test (#10847)
This commit is contained in:
parent
d3e9c565b7
commit
0d90bc9920
|
@ -181,6 +181,7 @@ cypress-run-all() {
|
|||
# so errors can print to stderr.
|
||||
local flasklog="${HOME}/flask.log"
|
||||
local port=8081
|
||||
export CYPRESS_BASE_URL="http://localhost:${port}"
|
||||
|
||||
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
|
||||
local flaskProcessId=$!
|
||||
|
|
|
@ -607,6 +607,7 @@ We use [Cypress](https://www.cypress.io/) for integration tests. Tests can be ru
|
|||
|
||||
```bash
|
||||
export SUPERSET_CONFIG=tests.superset_test_config
|
||||
export CYPRESS_BASE_URL="http://localhost:8081"
|
||||
superset db upgrade
|
||||
superset init
|
||||
superset load_test_users
|
||||
|
@ -632,6 +633,10 @@ npm run cypress run -- --spec cypress/integration/dashboard/index.test.js --conf
|
|||
|
||||
# to open the cypress ui
|
||||
npm run cypress open
|
||||
|
||||
# to point cypress to a url other than the default (http://localhost:8088) set the environment variable before running the script
|
||||
# e.g., CYPRESS_BASE_URL="http://localhost:9000"
|
||||
CYPRESS_BASE_URL=<your url> npm run cypress open
|
||||
```
|
||||
|
||||
See [`superset-frontend/cypress_build.sh`](https://github.com/apache/incubator-superset/blob/master/superset-frontend/cypress_build.sh).
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"baseUrl": "http://localhost:8081",
|
||||
"baseUrl": "http://localhost:8088",
|
||||
"chromeWebSecurity": false,
|
||||
"defaultCommandTimeout": 5000,
|
||||
"experimentalFetchPolyfill": true,
|
||||
|
|
|
@ -25,7 +25,8 @@ time superset load_test_users
|
|||
time superset load_examples --load-test-data
|
||||
time superset init
|
||||
echo "[completed python build steps]"
|
||||
flask run -p 8081 --with-threads --reload --debugger &
|
||||
PORT='8081'
|
||||
flask run -p $PORT --with-threads --reload --debugger &
|
||||
|
||||
#block on the longer running javascript process
|
||||
time npm ci
|
||||
|
@ -35,6 +36,7 @@ echo "[completed js build steps]"
|
|||
#setup cypress
|
||||
cd cypress-base
|
||||
time npm ci
|
||||
export CYPRESS_BASE_URL="http://localhost:${PORT}"
|
||||
CYPRESS_PATH='cypress/integration/'${1}'/*'
|
||||
time npm run cypress run -- --spec "$CYPRESS_PATH" --record false --config video=false
|
||||
|
||||
|
|
Loading…
Reference in New Issue