diff --git a/src/notary.py b/src/notary.py index 2fd23f1..af42375 100644 --- a/src/notary.py +++ b/src/notary.py @@ -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") diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index e56d9e8..4dced85 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -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 != ""