tests are now ran with https as we now use https with nginx as a frontend however:
The client tester is super scuffed and no longer in a pipeline ready state as a new docker image has to be created(again)
This commit is contained in:
@@ -213,5 +213,5 @@ def run(worker: Worker):
|
||||
worker.logs()
|
||||
|
||||
if __name__ == '__main__':
|
||||
worker = Worker('http://localhost:4536', create_admin=True)
|
||||
worker = Worker('https://localhost', create_admin=True)
|
||||
run(worker)
|
||||
|
||||
@@ -4,6 +4,13 @@ import time
|
||||
import json
|
||||
from urllib.parse import quote
|
||||
|
||||
# TODO/NOTE: this isn't necessary for literally any server that doesn't self-sign
|
||||
# There's prolly a less retared way of doing this "safely" in testing pipelines
|
||||
# but im in no rush to figure that out right now
|
||||
import urllib3
|
||||
urllib3.disable_warnings()
|
||||
|
||||
|
||||
|
||||
class RequestError(Exception):
|
||||
pass
|
||||
@@ -139,13 +146,13 @@ class Request:
|
||||
url = self.url + self.query_string
|
||||
raw_params = (self.query_string, self.qs_dict)
|
||||
if method == 'get':
|
||||
resp = requests.get(url)
|
||||
resp = requests.get(url, verify=False)
|
||||
return Response('get', url, resp.text, resp.status_code, hope, p=raw_params)
|
||||
elif method == 'post':
|
||||
resp = requests.post(url, data=self.body)
|
||||
resp = requests.post(url, data=self.body, verify=False)
|
||||
return Response('post', url, resp.text, resp.status_code, hope, p=raw_params)
|
||||
elif method == 'delete':
|
||||
resp = requests.delete(url)
|
||||
resp = requests.delete(url, verify=False)
|
||||
return Response('delete', url, resp.text, resp.status_code, hope, p=raw_params)
|
||||
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user