mirror of
https://github.com/EDCD/EDDN.git
synced 2026-11-18 01:32:25 +03:00
Gateway: Add test scripts and supporting files
These are what I was using on my home server to test the prior code changes to how the Gateway code reports errors. Ultimately these should become a part of proper tests, but for now they're at least in the repository for anyone to utilise.
This commit is contained in:
15 files changed
+7331
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import requests
|
||||
import sys
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print('test-sender.py <filename>')
|
||||
sys.exit(-1)
|
||||
|
||||
with open(sys.argv[1], 'r') as f:
|
||||
msg = f.read()
|
||||
|
||||
s = requests.Session()
|
||||
|
||||
r = s.post('https://beta.eddn.edcd.io:4431/upload/', data=msg)
|
||||
|
||||
print(f'Response: {r!r}')
|
||||
print(f'Body: {r.content.decode()}')
|
||||
|
||||
Reference in new issue
Block a user