healthcheck load tests (for testing)

This commit is contained in:
Sergey Chubaryan 2024-08-28 20:48:20 +03:00
parent 3d47b109d6
commit a12e57e564
2 changed files with 18 additions and 0 deletions

View File

@ -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')

View 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)