Skip to content

Expose actual command stdout / stderr on the goss test result #483

@colearendt

Description

@colearendt

It would be nice to be able to opt into exposing the stdout that is compared to a regex / etc. in a command resource. This is a super trivial example, but suppose I wanted to test how many files are in a folder, and ensure that the number is greater than 3:

  "NUMAPP=$(expr $(ls -l /apps | wc -l) - 1); if [ $NUMAPP -ge 3 ]; then echo success: $NUMAPP; else echo fail: $NUMAPP; fi":
    title: apps_deployed_gt_3
    exit-status: 0
    stdout: [
      "/^success/"
    ]
    stderr: []

It would be nice if the stdout (i.e. success: 4) and/or stderr could be returned in the lengthy / verbose test output (i.e. JSON, documentation, etc.).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions