unit tests: change test_config_audits to use mock_packages, add mock openssl (#50308)

This commit is contained in:
Tamara Dahlgren 2025-05-05 23:10:11 -07:00 committed by GitHub
parent ecb122f4c1
commit 5c7fe24bec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -93,6 +93,7 @@ def test_package_audits(packages, expected_errors, mock_packages):
]
# TODO/RepoSplit: Should this not rely on mock packages post split?
@pytest.mark.parametrize(
"config_section,data,failing_check",
[
@ -113,7 +114,7 @@ def test_package_audits(packages, expected_errors, mock_packages):
),
],
)
def test_config_audits(config_section, data, failing_check):
def test_config_audits(config_section, data, failing_check, mock_packages):
with spack.config.override(config_section, data):
reports = spack.audit.run_group("configs")
assert any((check == failing_check) and errors for check, errors in reports)

View File

@ -0,0 +1,9 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Openssl(Package):
version("3.4.0")