mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-09 12:49:27 +00:00
Reproduce the original bug where `--tenant-id` was ignored when AZURE_TENANT_ID was unset: `check_certificate_creds_env_vars` must not raise when the explicit tenant replaces a missing env var. Add the missing `requests.exceptions.Timeout` coverage: verify_client translates the transport error to AzureCredentialsUnavailableError, and test_connection with raise_on_exception=False returns Connection(error=AzureCredentialsUnavailableError) instead of a raw transport exception. Assert end-to-end that CertificateCredential receives a leaf-first bundle on both the env-var / --certificate-path branch and the azure_credentials (API/UI) branch. A regression that skips the normalization at any call site would silently break auth today; the helper-only test could not catch that.