Skip to content

Commit

Permalink
chore: improve function name
Browse files Browse the repository at this point in the history
Signed-off-by: guillaume <[email protected]>
  • Loading branch information
gruyaume committed Sep 26, 2024
1 parent ca73152 commit 62cb250
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/notary.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ def create_certificate_request(
)
return None

def create_certificate(
def create_certificate_from_csr(
self, csr: str, cert_chain: list[str], token: str
) -> CreateCertificateResponse | None:
"""Create a new certificate in Notary."""
"""Create a certificate from a CSR in Notary."""
certificate_requests = self.list_certificate_requests(token=token)
if not certificate_requests:
logger.error("couldn't list certificate requests")
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def test_given_notary_when_tls_requirer_related_then_csr_uploaded_to_notar
CertificateSigningRequest.from_string(certificate_request.csr), ca, ca_pk, 365
)
chain = [str(cert), str(ca)]
client.create_certificate(certificate_request.csr, chain, token)
client.create_certificate_from_csr(certificate_request.csr, chain, token)

certificate_requests = client.list_certificate_requests(token)
assert certificate_requests[0].certificate_chain != ""
Expand Down

0 comments on commit 62cb250

Please sign in to comment.