Adding upstream version 1.4.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
dc7df702ea
commit
7996c81031
166 changed files with 13787 additions and 11959 deletions
|
@ -37,6 +37,7 @@ def test_anta_dry_run(
|
|||
|
||||
results = session_results[request.node.callspec.id]
|
||||
|
||||
# TODO: Use AntaRunner directly in ANTA v2.0.0
|
||||
@benchmark
|
||||
def _() -> None:
|
||||
results.reset()
|
||||
|
@ -69,6 +70,7 @@ def test_anta(
|
|||
|
||||
results = session_results[request.node.callspec.id]
|
||||
|
||||
# TODO: Use AntaRunner directly in ANTA v2.0.0
|
||||
@benchmark
|
||||
def _() -> None:
|
||||
results.reset()
|
||||
|
@ -77,21 +79,6 @@ def test_anta(
|
|||
|
||||
logging.disable(logging.NOTSET)
|
||||
|
||||
if len(catalog.tests) * len(inventory) != len(results.results):
|
||||
# This could mean duplicates exist.
|
||||
# TODO: consider removing this code and refactor unit test data as a dictionary with tuple keys instead of a list
|
||||
seen = set()
|
||||
dupes = []
|
||||
for test in catalog.tests:
|
||||
if test in seen:
|
||||
dupes.append(test)
|
||||
else:
|
||||
seen.add(test)
|
||||
if dupes:
|
||||
for test in dupes:
|
||||
msg = f"Found duplicate in test catalog: {test}"
|
||||
logger.error(msg)
|
||||
pytest.fail(f"Expected {len(catalog.tests) * len(inventory)} tests but got {len(results.results)}", pytrace=False)
|
||||
bench_info = (
|
||||
"\n--- ANTA NRFU Benchmark Information ---\n"
|
||||
f"Test results: {len(results.results)}\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue