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:
Athanasius committed 2022-01-09 16:21:23 +00:00
1 parent 75c117fb12
commit 2a8eb8d021
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()}')