diff --git a/anta/catalog.py b/anta/catalog.py index ca0eeb176..0aeebd91c 100644 --- a/anta/catalog.py +++ b/anta/catalog.py @@ -323,6 +323,8 @@ def tests(self, value: list[AntaTestDefinition]) -> None: msg = "A test in the catalog must be an AntaTestDefinition instance" raise TypeError(msg) self._tests = value + # Tests were modified so indexes need to be rebuilt. + self.clear_indexes() @staticmethod def parse(filename: str | Path, file_format: Literal["yaml", "json"] = "yaml") -> AntaCatalog: