Skip to content
Snippets Groups Projects

[Tests] Validate metadata for retrieved constants before validating the corrected files

Merged Karim Ahmed requested to merge test/check_retrieved_constants into master
1 unresolved thread
@@ -375,17 +375,20 @@ def test_xfel_calibrate(
if time_counter > time_to_wait:
assert False, f"{test_key} failure, report doesn't exists."
LOGGER.info("Report found.")
# For corrections validate same calibration constants were retrieved.
metadata_file = f"calibration_metadata_{cal_conf['karabo-id']}"
assert compare_metadata_ccvs(
out_folder / metadata_file,
reference_folder / metadata_file,
"retrieved-constants",
), "Found difference in the metadata for the retrieved Constants."
if cal_type.lower() == "correct":
# For corrections validate calibration constants
metadata_file = f"calibration_metadata_{cal_conf['karabo-id']}.yml"
assert compare_metadata_ccvs(
out_folder / metadata_file,
reference_folder / metadata_file,
"retrieved-constants",
), "Found difference in the metadata for the retrieved Constants."
LOGGER.info("Retrieved CCVs validated.")
# Stop tests at this point, if desired.
if not skip_numerical_validation:
assert validate_hdf5_files(
out_folder, reference_folder, cal_type
), "HDF5 files changed - see details above"
LOGGER.info("H5 Files validated.")
Loading