mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 19:26:19 +00:00
Add test to reproduce the problem
This commit is contained in:
@@ -434,6 +434,20 @@ def step_impl(context: Context, email: str, kid: str, secret: str, account_var:
|
||||
)
|
||||
|
||||
|
||||
@then("I find the existing ACME account without EAB as {account_var}")
|
||||
def step_impl(context: Context, account_var: str):
|
||||
acme_client = context.acme_client
|
||||
registration = messages.NewRegistration.from_data(
|
||||
only_return_existing=True,
|
||||
)
|
||||
# Reset account so that it will send JWK instead of KID
|
||||
acme_client.net.account = None
|
||||
try:
|
||||
context.vars[account_var] = acme_client.new_account(registration)
|
||||
except Exception as exp:
|
||||
context.vars["error"] = exp
|
||||
|
||||
|
||||
@then("I register a new ACME account with email {email} without EAB")
|
||||
def step_impl(context: Context, email: str):
|
||||
acme_client = context.acme_client
|
||||
@@ -600,6 +614,19 @@ def step_impl(context: Context, var_path: str, jq_query: str):
|
||||
)
|
||||
|
||||
|
||||
@then("the value {var_path} with should be absent")
|
||||
def step_impl(context: Context, var_path: str):
|
||||
try:
|
||||
value = eval_var(context, var_path)
|
||||
except Exception as exp:
|
||||
if isinstance(exp, KeyError):
|
||||
return
|
||||
raise
|
||||
assert False, (
|
||||
f"value at {var_path!r} should be absent, but we got this instead: {value!r}"
|
||||
)
|
||||
|
||||
|
||||
@then('the value {var_path} with jq "{jq_query}" should be equal to {expected}')
|
||||
def step_impl(context: Context, var_path: str, jq_query: str, expected: str):
|
||||
value, result = apply_value_with_jq(
|
||||
|
||||
Reference in New Issue
Block a user