turn dependencies into strings

This commit is contained in:
Daniel 2023-12-05 16:50:17 +01:00
parent 97fb896c43
commit 24dae132a1
4 changed files with 4 additions and 6 deletions

View file

@ -22,7 +22,7 @@ class Runner:
setups: list[Test] = [] setups: list[Test] = []
tests: list[Test] = [] tests: list[Test] = []
cleanups: list[Test] = [] cleanups: list[Test] = []
dependencies: list[type["Runner"]] = [] dependencies: list[str] = []
prevent_skip = False prevent_skip = False
def __init__(self, dotenv_path: Path, output_dir: Path, session_id: str): def __init__(self, dotenv_path: Path, output_dir: Path, session_id: str):

View file

@ -12,7 +12,7 @@ class RunnerDemo(Runner):
# RunnerDemo will only execute, when setup_authentik.py has finished successfully. # RunnerDemo will only execute, when setup_authentik.py has finished successfully.
# For example, setup_authentik.py generates session states, that can be used as fixtures # For example, setup_authentik.py generates session states, that can be used as fixtures
# that can be loaded from fixtures_authentik.py # that can be loaded from fixtures_authentik.py
dependencies: list[type["Runner"]] = [RunnerAuthentik] dependencies: list[str] = ["authentik"]
# todo: update these comments # todo: update these comments
# Filename of Demo setup. If defined, it will run 1st by executing pytest # Filename of Demo setup. If defined, it will run 1st by executing pytest

View file

@ -1,5 +1,4 @@
from src.runner import Runner, Test from src.runner import Runner, Test
from src.tests_authentik.runner_authentik import RunnerAuthentik
def condition_always_false(dotenv_config: dict[str, str]) -> bool: def condition_always_false(dotenv_config: dict[str, str]) -> bool:
@ -9,7 +8,7 @@ def condition_always_false(dotenv_config: dict[str, str]) -> bool:
class RunnerNextcloud(Runner): class RunnerNextcloud(Runner):
name: str = "nextcloud" name: str = "nextcloud"
test_dir_name: str = "tests_nextcloud" test_dir_name: str = "tests_nextcloud"
dependencies = [RunnerAuthentik] dependencies = ["authentik"]
setups = [Test(test_file="setup_nextcloud.py", prevent_skip=False)] setups = [Test(test_file="setup_nextcloud.py", prevent_skip=False)]
tests = [ tests = [
Test(test_file="tests_nextcloud.py", prevent_skip=True), Test(test_file="tests_nextcloud.py", prevent_skip=True),

View file

@ -1,5 +1,4 @@
from src.runner import Runner, Test from src.runner import Runner, Test
from src.tests_authentik.runner_authentik import RunnerAuthentik
def condition_always_true(dotenv_config: dict[str, str]) -> bool: def condition_always_true(dotenv_config: dict[str, str]) -> bool:
@ -20,7 +19,7 @@ def condition_has_locale(dotenv_config: dict[str, str]) -> bool:
class RunnerWordpress(Runner): class RunnerWordpress(Runner):
name = "wordpress" name = "wordpress"
test_dir_name = "tests_wordpress" test_dir_name = "tests_wordpress"
dependencies: list[type[Runner]] = [RunnerAuthentik] dependencies = ["authentik"]
setups = [Test(test_file="setup_wordpress.py")] setups = [Test(test_file="setup_wordpress.py")]
tests = [ tests = [
Test(test_file="test_wordpress.py"), Test(test_file="test_wordpress.py"),