mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-10 16:08:20 -05:00
More tests
This commit is contained in:
@@ -10,7 +10,7 @@ Feature: ACME Cert Profile
|
||||
"slug": "{profile_slug}",
|
||||
"description": "",
|
||||
"enrollmentType": "acme",
|
||||
"caId": "{CA_ID}",
|
||||
"caId": "{CERT_CA_ID}",
|
||||
"certificateTemplateId": "{CERT_TEMPLATE_ID}",
|
||||
"acmeConfig": {}
|
||||
}
|
||||
|
||||
@@ -149,14 +149,24 @@ def step_impl(context: Context, method: str, url: str):
|
||||
|
||||
@when('I send a {method} request to "{url}" with JSON payload')
|
||||
def step_impl(context: Context, method: str, url: str):
|
||||
json_payload = json.loads(context.text)
|
||||
json_payload = replace_vars(json_payload, context.vars)
|
||||
logger.debug(
|
||||
"Sending %s request to %s with JSON payload: %s",
|
||||
method,
|
||||
url,
|
||||
json.dumps(json_payload),
|
||||
)
|
||||
response = context.http_client.request(
|
||||
method,
|
||||
url.format(**context.vars),
|
||||
headers=prepare_headers(context),
|
||||
json=json.loads(context.text),
|
||||
json=json_payload,
|
||||
)
|
||||
context.response = response
|
||||
context.vars["response"] = response
|
||||
logger.debug("Response status: %r", response.status_code)
|
||||
logger.debug("Response JSON payload: %r", response.json())
|
||||
|
||||
|
||||
@when("I have an ACME client connecting to {url}")
|
||||
|
||||
Reference in New Issue
Block a user