Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Dec 18, 2023
1 parent e9100a0 commit f21945b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/ocrd_lib_test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

source ../ocrd_lib.sh
source ocrd_lib.sh
7 changes: 4 additions & 3 deletions tests/ocrd_lib_webhook_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ def webhook_send(httpserver: HTTPServer, keyData: str, event: str, message: str

if event == "INFO":
# including message in bash call
subprocess.Popen(['bash', '-c', 'WEBHOOK_RECEIVER_URL={0}; WEBHOOK_KEY_DATA={1}; source ocrd_lib_test.sh; webhook_send_{2} {3}'.format(httpserver.url_for("/endpoint"), keyData, event.lower(), message) ])
subprocess.Popen(['bash', '-c', 'WEBHOOK_RECEIVER_URL={0}; WEBHOOK_KEY_DATA={1}; source tests/ocrd_lib_test.sh; webhook_send_{2} {3}'.format(httpserver.url_for("/endpoint"), keyData, event.lower(), message) ],
stdout=subprocess.PIPE)
else:
subprocess.Popen(['bash', '-c', 'WEBHOOK_RECEIVER_URL={0}; WEBHOOK_KEY_DATA={1}; source ocrd_lib_test.sh; webhook_send_{2}'.format(httpserver.url_for("/endpoint"), keyData, event.lower()) ])
subprocess.Popen(['bash', '-c', 'WEBHOOK_RECEIVER_URL={0}; WEBHOOK_KEY_DATA={1}; source tests/ocrd_lib_test.sh; webhook_send_{2}'.format(httpserver.url_for("/endpoint"), keyData, event.lower()) ])

time.sleep(0.1)
time.sleep(1)

assert len(httpserver.log) == 1

Expand Down

0 comments on commit f21945b

Please sign in to comment.