healthcheck load tests (for testing)
This commit is contained in:
parent
3d47b109d6
commit
a12e57e564
@ -66,3 +66,8 @@ class BackendApi():
|
||||
response = self.http.client.get("/dummy", headers=headers)
|
||||
if response.status_code != 200:
|
||||
raise AssertionError('something wrong')
|
||||
|
||||
def health_get(self):
|
||||
response = self.http.client.get("/health")
|
||||
if response.status_code != 200:
|
||||
raise AssertionError('something wrong')
|
||||
13
load_tests/tests/health.py
Normal file
13
load_tests/tests/health.py
Normal file
@ -0,0 +1,13 @@
|
||||
from locust import FastHttpUser, task
|
||||
|
||||
from api import BackendApi
|
||||
|
||||
class HealthGet(FastHttpUser):
|
||||
api: BackendApi
|
||||
|
||||
@task
|
||||
def user_create_test(self):
|
||||
self.api.health_get()
|
||||
|
||||
def on_start(self):
|
||||
self.api = BackendApi(self)
|
||||
Loading…
x
Reference in New Issue
Block a user