-
Notifications
You must be signed in to change notification settings - Fork 51
/
circle-tests.sh
executable file
·37 lines (31 loc) · 1.19 KB
/
circle-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
## Helper to run tests locally using same commands as circle ci config
# See: encoded/.circleci/config.yml
#
# Use Cases: No argument defaults to not bdd tests which are indexing and not indexing
# $ circle-tests.sh bdd
# $ circle-tests.sh not-bdd-indexing
# $ circle-tests.sh not-bdd-non-indexing
# $ circle-tests.sh npm
# $ circle-tests.sh
##
if [ "$1" == "bdd" ]; then
ES_JAVA_OPTS="-Xms2g -Xmx3g" python -m pytest --exitfirst -s -vv -m "bdd" --tb=short --splinter-implicit-wait=2 --splinter-webdriver=chrome --splinter-socket-timeout=300 --splinter-session-scoped-browser=false --splinter-headless=true --chrome-options "--disable-gpu --no-sandbox --disable-dev-shm-usage --disable-extensions --whitelisted-ips --window-size=1920,1080"
exit
fi
if [ "$1" == "indexing" ]; then
ES_JAVA_OPTS="-Xms2g -Xmx3g" python -m pytest --exitfirst -s -vv -m "indexing"
exit
fi
if [ "$1" == "indexer" ]; then
ES_JAVA_OPTS="-Xms2g -Xmx3g" python -m pytest --exitfirst -s -vv -m "indexer"
exit
fi
if [ "$1" == "not-bdd-non-indexing" ]; then
python -m pytest --exitfirst -s -vv -m "not bdd and not indexing and not indexer"
exit
fi
if [ "$1" == "npm" ]; then
npm test
exit
fi