fediverse-devnet / fediverse-devnet/feditest

Validate Node parameters earlier

Open
#450 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
37
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Right now, `TestRunSession.run` invokes `self.run_constellation.setup()` invokes `node_driver.create_configuration_account_manager()` which may check for the existence of needed parameters and thus can raise an exception. For example, the default implementation of `NodeDriver` is:

```
def create_configuration_account_manager(self, rolename: str, test_plan_node: TestPlanConstellationNode) -> tuple[NodeConfiguration, AccountManager | None]:
return (
NodeConfiguration(
self,
test_plan_node.parameter_or_raise(APP_PAR),
test_plan_node.parameter(APP_VERSION_PAR),
test_plan_node.parameter(HOSTNAME_PAR)
),
None
)
```
which raises an exception if `APP_PAR` is not given.

The problem is that this exception is raised when the `TestPlan` is already in the middle of running, e.g. the `TestRunSession` may be the second session in the plan. This confuses the user -- the problem is a configuration problem that should have prevented the `TestPlan` from starting. And error reporting goes to the test run transcript, which is the wrong place.

Find a way of doing the parameter checking **before** the `TestPlan` starts running.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.