Skip to content

Commit

Permalink
Update debug.bats
Browse files Browse the repository at this point in the history
  • Loading branch information
georgetarazevich committed Dec 14, 2023
1 parent ffc6f8f commit 4953681
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/Options/config/validator/debug.bats
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bats
BATS_TEST_TIMEOUT=120 # sec

setup() {
PROJECT_ROOT="$(cd "$(dirname "$BATS_TEST_FILENAME")/../../.." >/dev/null 2>&1 && pwd)"
Expand All @@ -20,12 +21,13 @@ teardown() {

@test "--debug, Outputs all processed file names, debug=true" {

run curl -F "file=@$PROJECT_ROOT/Resources/a.pdf" localhost:8080/api/validate/3a -H "Accept:text/html"
run curl -F "file=@$PROJECT_ROOT/Resources/a_for_debug.pdf" localhost:8080/api/validate/3a -H "Accept:text/html"
[ "$status" -eq 0 ]

sleep 10 # sleep 10 sec
sleep 5 # sleep sec
run docker logs $DOCKER_CONTAINER -t --since=$test_logs_starting_time

sleep 10 # sleep 10 sec
assert_output --partial "INFO: a.pdf"
sleep 30 # sleep sec
echo "$output" >&3
assert_output --partial "INFO: a_for_debug.pdf"
}
Binary file added tests/Resources/a_for_debug.pdf
Binary file not shown.

0 comments on commit 4953681

Please sign in to comment.