mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-27 04:53:13 -05:00
use debug config
Signed-off-by: hrj <harshad.rj@gmail.com>
This commit is contained in:
parent
c0ac570746
commit
3845645f9a
14
tests/debug-config.json
Normal file
14
tests/debug-config.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"randomSeed" : 20,
|
||||
"port" : 8888,
|
||||
"captchaExpiryTimeLimit" : 5,
|
||||
"throttle" : 10,
|
||||
"threadDelay" : 2,
|
||||
"captchas" : [ {
|
||||
"name" : "DebugCaptcha",
|
||||
"allowedLevels" : [ "debug" ],
|
||||
"allowedMedia" : [ "image/png" ],
|
||||
"allowedInputType" : [ "text" ],
|
||||
"config" : { }
|
||||
}]
|
||||
}
|
12
tests/run.sh
12
tests/run.sh
@ -11,13 +11,23 @@ locust --headless -u 300 -r 100 --run-time 4m --stop-timeout 30 -f tests/locustf
|
||||
status=$?
|
||||
|
||||
if [ $status != 0 ]; then
|
||||
kill $JAVA_PID
|
||||
exit $status
|
||||
fi
|
||||
|
||||
kill $JAVA_PID
|
||||
sleep 4
|
||||
|
||||
echo Run functional test
|
||||
cp data/config.json data/config.json.bak
|
||||
cp tests/debug-config.json data/config.json
|
||||
|
||||
java -jar target/scala-2.13/LibreCaptcha.jar &
|
||||
JAVA_PID=$!
|
||||
sleep 4
|
||||
|
||||
locust --headless -u 1 -r 1 --run-time 1m --stop-timeout 30 -f tests/locustfile-functional.py
|
||||
status=$?
|
||||
mv data/config.json.bak data/config.json
|
||||
|
||||
kill $JAVA_PID
|
||||
exit $status
|
||||
|
Loading…
x
Reference in New Issue
Block a user