File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -186,3 +186,5 @@ cypress/snapshots
186186cypress /videos
187187
188188/.direnv
189+
190+ /.hypothesis /
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ user=" $1 "
5+ spec=" $2 "
6+
7+ python -m venv venv
8+ source venv/bin/activate
9+ pip install schemathesis==4.1.0
10+
11+ rm data config/config.php -rf
12+
13+ ./occ maintenance:install --admin-pass admin
14+ ./occ config:system:set auth.bruteforce.protection.enabled --value=false --type=boolean
15+
16+ if [[ " $user " != " admin" ]]; then
17+ ./occ app:disable password_policy
18+ NC_PASS=" $user " ./occ user:add " $user " --password-from-env
19+ fi
20+
21+ app_password=" $( echo " $user " | ./occ user:auth-tokens:add " $user " | tail -n 1) "
22+
23+ # Ensure enough workers will be available to handle all requests
24+ NEXTCLOUD_WORKERS=100 composer serve & > /dev/null &
25+ pid=$!
26+ function cleanup() {
27+ kill " $pid "
28+ }
29+ trap cleanup EXIT
30+
31+ until curl -s -o /dev/null http://localhost:8080/status.php; do sleep 1s; done
32+
33+ schemathesis run \
34+ " $spec " \
35+ --checks all \
36+ --workers 64 \
37+ --url http://localhost:8080 \
38+ -H " OCS-APIRequest: true" \
39+ -H " Accept: application/json" \
40+ -H " Authorization: Bearer $app_password " \
41+ --exclude-checks missing_required_header,unsupported_method,ignored_auth
You can’t perform that action at this time.
0 commit comments