Skip to content

Validate Node parameters earlier #450

@jernst

Description

@jernst

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions