Skip to content

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

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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions