Skip to content

Commit

Permalink
#135 Add homework insertion task
Browse files Browse the repository at this point in the history
  • Loading branch information
vityaman committed Jun 13, 2024
1 parent 03d0308 commit 0c05b5f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions infra/fuzzing/custom/homeworks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh

set -e

TOKEN="$1"
MOMENT="$2"

echo "[fuzz] Got access token: '$TOKEN'"
echo "[fuzz] Got moment: '$MOMENT'"

for _ in $(seq 1 128); do
curl -X 'POST' \
'http://localhost:8080/api/v1/homework' \
-H 'accept: application/json' \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d "{
\"title\": \"Test Homework\",
\"description\": \"Test Description\",
\"max_score\": 500,
\"publication_moment\": \"$MOMENT\",
\"deadline_moment\": \"2026-07-11T12:00:00Z\"
}"
done

0 comments on commit 0c05b5f

Please sign in to comment.