new-features (#5)
* refactoring and rework: runner now has setups / tests / cleanups as lists * add nextcloud runner * add email testing prototype with imap fixture * add dependency resolution (sort env files in input so that test order is correct) Reviewed-on: local-it-infrastructure/e2e_tests#5 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
2e33f8f014
commit
d3dc0f942a
32 changed files with 573 additions and 247 deletions
|
|
@ -1,6 +1,4 @@
|
|||
from typing import Optional
|
||||
|
||||
from src.runner import Runner, SubTest
|
||||
from src.runner import Runner, Test
|
||||
from src.tests_authentik.runner_authentik import RunnerAuthentik
|
||||
|
||||
|
||||
|
|
@ -10,20 +8,19 @@ class RunnerDemo(Runner):
|
|||
name: str = "demo" # name of the test, used for logging / output naming
|
||||
test_dir_name: str = "tests_demo" # dir name holding all tests related to RunnerDemo
|
||||
|
||||
# Filename of Demo setup. If defined, it will run 1st by executing pytest
|
||||
main_setup_name: Optional[str] = "setup_demo.py"
|
||||
|
||||
# Filename of Demo test. This file contains unconditional tests that will be run in any
|
||||
# case. If defined, it will run 2nd by executing pytest
|
||||
main_test_name: Optional[str] = None
|
||||
|
||||
# this indicates that tests from RunnerDemo depend on the setup from RunnerAuthentik.
|
||||
# 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
|
||||
# that can be loaded from fixtures_authentik.py
|
||||
dependencies: list[type["Runner"]] = [RunnerAuthentik]
|
||||
|
||||
# todo: update these comments
|
||||
# Filename of Demo setup. If defined, it will run 1st by executing pytest
|
||||
# Filename of Demo test. This file contains unconditional tests that will be run in any
|
||||
# case. If defined, it will run 2nd by executing pytest
|
||||
# this list can hold many more tests from RunnerDemo that run conditional. The condition
|
||||
# and the test file can be defined by creating a SubTest instance:
|
||||
# SubTest(condition: Callable, test_file: str)
|
||||
sub_tests: list[SubTest] = []
|
||||
# and the test file can be defined by creating a ConditionalTest instance:
|
||||
# ConditionalTest(condition: Callable, test_file: str)
|
||||
setups: list[Test] = []
|
||||
tests: list[Test] = []
|
||||
cleanups: list[Test] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue