refactoring (#13)
* general project refactoring * various small improvements * improve imap fixture with helper functions and typing * add wordpress send email setup * add wordpress receive email test * add various documentation Reviewed-on: local-it-infrastructure/e2e_tests#13 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
41a042f07d
commit
d1ff1183a5
29 changed files with 323 additions and 175 deletions
|
|
@ -15,21 +15,21 @@ from pytest_abra.utils import rmtree
|
|||
class Coordinator:
|
||||
def __init__(
|
||||
self,
|
||||
env_paths_list: list[Path],
|
||||
env_paths: list[Path],
|
||||
output_dir: Path,
|
||||
session_id: str,
|
||||
recipes_dir: Path,
|
||||
timeout: int,
|
||||
) -> None:
|
||||
# logging
|
||||
out_string = "".join([e.name + "\n" for e in env_paths_list])
|
||||
out_string = "".join([e.name + "\n" for e in env_paths])
|
||||
out_string += f"output_dir = {output_dir}\n"
|
||||
out_string += f"session_id = {session_id}"
|
||||
logger.info(f"initialize Coordinator instance with\nenv_paths_list =\n{out_string}")
|
||||
|
||||
self.RUNNER_DICT = self.create_runner_dict(recipes_dir)
|
||||
self.DIR = DirManager(output_dir=output_dir, session_id=session_id, recipes_dir=recipes_dir)
|
||||
self.ENV = EnvManager(env_paths_list, self.RUNNER_DICT)
|
||||
self.ENV = EnvManager(env_paths=env_paths, RUNNER_DICT=self.RUNNER_DICT)
|
||||
self.TIMEOUT = timeout
|
||||
|
||||
def setup_test(self) -> None:
|
||||
|
|
@ -52,7 +52,7 @@ class Coordinator:
|
|||
"""Creates an instance of the correct Runner class for each given env file"""
|
||||
runners: list[Runner] = []
|
||||
for index, env_file in enumerate(env_files):
|
||||
RunnerClass = self.RUNNER_DICT[env_file.config["TYPE"]]
|
||||
RunnerClass = self.RUNNER_DICT[env_file.env_config["TYPE"]]
|
||||
runners.append(RunnerClass(coordinator=self, runner_index=index))
|
||||
return runners
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue