]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add ca_cert_required parameter to get_certificates mock in test
authorRabinarayan Panigrahi <rapanigr@redhat.com>
Sun, 31 May 2026 16:39:09 +0000 (22:09 +0530)
committerRabinarayan Panigrahi <rapanigr@redhat.com>
Thu, 18 Jun 2026 13:50:17 +0000 (19:20 +0530)
Add the ca_cert_required parameter to the lambda function mocking
CephadmService.get_certificates in test_prometheus_config_security_enabled
to match the updated method signature.

This ensures the test mock properly handles the new parameter that was
added to the get_certificates method.

Signed-off-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
src/pybind/mgr/cephadm/tests/services/test_monitoring.py

index 6c23592dd78f1dc5672da35ec6998da1740170a7..340a231d2e325461e76f9a3cb0c4de59e4715923 100644 (file)
@@ -793,7 +793,7 @@ class TestMonitoring:
     @patch("cephadm.services.monitoring.password_hash", lambda password: 'prometheus_password_hash')
     @patch('cephadm.cert_mgr.CertMgr.get_root_ca', lambda instance: 'cephadm_root_cert')
     @patch("cephadm.services.cephadmservice.CephadmService.get_certificates",
-           lambda instance, dspec, ips=None, fqdns=None: TLSCredentials('mycert', 'mykey'))
+           lambda instance, dspec, ips=None, fqdns=None, ca_cert_required=False: TLSCredentials('mycert', 'mykey'))
     def test_prometheus_config_security_enabled(self, _run_cephadm, _get_uname, cephadm_module: CephadmOrchestrator):
         _run_cephadm.side_effect = async_side_effect(('{}', '', 0))
         _get_uname.return_value = 'test'