Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

More tests

Fang-Pen Lin52ae835d0fe7
diff --git a/backend/bdd/features/pki/acme/cert-profile.feature b/backend/bdd/features/pki/acme/cert-profile.feature
index 7e4dbdc84a..1fc6f0daef 100644
--- a/backend/bdd/features/pki/acme/cert-profile.feature
+++ b/backend/bdd/features/pki/acme/cert-profile.feature
@@ -15,10 +15,10 @@ Feature: ACME Cert Profile
"acmeConfig": {}
}
"""
- Then the value response.status_code should be equal to 201
- Then the value response with jq .eab_kid should be present
- Then the value response with jq .eab_secret should be present
- Then the value response with jq .slug should be equal to {profile_slug}
- Then the value response with jq .caId should be equal to {CA_ID}
- Then the value response with jq .certificateTemplateId should be equal to {CERT_TEMPLATE_ID}
- Then the value response with jq .enrollmentTYpe should be equal to acme
+ Then the value response.status_code should be equal to 200
+ Then the value response with jq .certificateProfile.slug should be equal to "{profile_slug}"
+ Then the value response with jq .certificateProfile.caId should be equal to "{CERT_CA_ID}"
+ Then the value response with jq .certificateProfile.certificateTemplateId should be equal to "{CERT_TEMPLATE_ID}"
+ Then the value response with jq .certificateProfile.enrollmentType should be equal to "acme"
+ Then the value response with jq .certificateProfile.eab_kid should be present
+ Then the value response with jq .certificateProfile.eab_secret should be present
diff --git a/backend/bdd/features/steps/pki_acme.py b/backend/bdd/features/steps/pki_acme.py
index 0bd55e3970..f2008e867d 100644
--- a/backend/bdd/features/steps/pki_acme.py
+++ b/backend/bdd/features/steps/pki_acme.py
@@ -3,6 +3,7 @@ import logging
import re
import threading
+import httpx
import jq
import requests
import glom
@@ -108,6 +109,8 @@ def eval_var(context: Context, var_path: str, as_json: bool = True):
value = value.to_json()
elif isinstance(value, requests.Response):
value = value.json()
+ elif isinstance(value, httpx.Response):
+ value = value.json()
return value
@@ -327,7 +330,7 @@ def step_impl(context: Context, var_path: str, jq_query: str, expected: str):
var_path=var_path,
jq_query=jq_query,
)
- expected_value = json.loads(expected)
+ expected_value = replace_vars(json.loads(expected), context.vars)
assert result == expected_value, (
f"{json.dumps(value)!r} with jq {jq_query!r}, the result {json.dumps(result)!r} does not match {json.dumps(expected_value)!r}"
)