mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Clean all
This commit is contained in:
@@ -10,7 +10,7 @@ from dotenv import load_dotenv
|
||||
from faker import Faker
|
||||
import logging
|
||||
|
||||
from features.steps.utils import clear_all_nock, restore_nock
|
||||
from features.steps.utils import clean_all_nock, restore_nock
|
||||
|
||||
load_dotenv()
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -207,5 +207,5 @@ def before_all(context: Context):
|
||||
def after_scenario(context: Context, scenario: typing.Any):
|
||||
if hasattr(context, "web_server"):
|
||||
context.web_server.shutdown_and_server_close()
|
||||
clear_all_nock(context)
|
||||
clean_all_nock(context)
|
||||
restore_nock(context)
|
||||
|
||||
@@ -281,10 +281,10 @@ def restore_nock(context: Context):
|
||||
response.raise_for_status()
|
||||
|
||||
|
||||
def clear_all_nock(context: Context):
|
||||
def clean_all_nock(context: Context):
|
||||
jwt_token = context.vars["AUTH_TOKEN"]
|
||||
response = context.http_client.post(
|
||||
"/api/v1/bdd-nock/clear-all",
|
||||
"/api/v1/bdd-nock/clean-all",
|
||||
headers=dict(authorization="Bearer {}".format(jwt_token)),
|
||||
json=dict(),
|
||||
)
|
||||
@@ -297,5 +297,5 @@ def with_nocks(context: Context, definitions: list[dict]):
|
||||
define_nock(context, definitions)
|
||||
yield
|
||||
finally:
|
||||
clear_all_nock(context)
|
||||
clean_all_nock(context)
|
||||
restore_nock(context)
|
||||
|
||||
@@ -39,7 +39,7 @@ export const registerBddNockRouter = async (server: FastifyZodProvider) => {
|
||||
|
||||
server.route({
|
||||
method: "POST",
|
||||
url: "/clear-all",
|
||||
url: "/clean-all",
|
||||
schema: {
|
||||
response: {
|
||||
200: z.object({ status: z.string() })
|
||||
|
||||
Reference in New Issue
Block a user