unit tests: change test_config_audits to use mock_packages, add mock openssl (#50308)
This commit is contained in:
parent
ecb122f4c1
commit
5c7fe24bec
@ -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(
|
@pytest.mark.parametrize(
|
||||||
"config_section,data,failing_check",
|
"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):
|
with spack.config.override(config_section, data):
|
||||||
reports = spack.audit.run_group("configs")
|
reports = spack.audit.run_group("configs")
|
||||||
assert any((check == failing_check) and errors for check, errors in reports)
|
assert any((check == failing_check) and errors for check, errors in reports)
|
||||||
|
9
var/spack/repos/builtin.mock/packages/openssl/package.py
Normal file
9
var/spack/repos/builtin.mock/packages/openssl/package.py
Normal 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")
|
Loading…
Reference in New Issue
Block a user