def setUp(self, **kwargs): super(ProbeTest, self).setUp(**kwargs) if not self.configs: config_file = os.path.join(CHECKS_DIR, "probes.yaml") for cfg in yaml.ReadManyFromPath(config_file): name = cfg.get("name") probe_cfg = cfg.get("probe", [{}]) self.configs[name] = probe_cfg[0]
def LoadConfigsFromFile(file_path): """Loads check definitions from a file.""" return {d["check_id"]: d for d in yaml.ReadManyFromPath(file_path)}