Skip to content

When Using Mock nodes allow conditional Success or Failure for return_status #995

@pepeRossRobotics

Description

@pepeRossRobotics

Issue
We have been implementing mock testing using the process described in here and we find that sometimes we want the mock to return SUCCESS or FAILURE based on a particular condition. Currently we use the post_script to set up a flag and then in the tree we set a script that reacts to the flag.

This solution is not ideal because adds a lot of unnecessary code to the tree to be able to test complex trees.

Describe the solution you'd like
It would be good to be able to set the return_status based on a script output e.g.

return_status = "(robot_failure == true) ? FAILURE : SUCCESS"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions