diff --git a/src/notary.py b/src/notary.py index ea57e78..2fd23f1 100644 --- a/src/notary.py +++ b/src/notary.py @@ -88,8 +88,7 @@ class DeleteCertificateRequestResponse: class CreateCertificateParams: """Parameters to create a certificate in Notary.""" - csr: str - cert_chain: list[str] + certificate: str @dataclass @@ -263,7 +262,7 @@ def create_certificate( if len(csr_ids) != 1: logger.error("given CSR not found in Notary") return None - create_certificate_params = CreateCertificateParams(csr=csr, cert_chain=cert_chain) + create_certificate_params = CreateCertificateParams(certificate="\n".join(cert_chain)) response = self._make_request( "POST", f"/api/{self.API_VERSION}/certificate_requests/{csr_ids[0].id}/certificate", diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index 51e9665..e56d9e8 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -49,13 +49,11 @@ async def test_build_and_deploy(ops_test: OpsTest, request: pytest.FixtureReques "self-signed-certificates", application_name=TLS_PROVIDER_APPLICATION_NAME, channel="edge", - trust=True, ) await ops_test.model.deploy( "tls-certificates-requirer", application_name=TLS_REQUIRER_APPLICATION_NAME, channel="edge", - trust=True, ) await ops_test.model.deploy( "prometheus-k8s",