Skip to content

Support for Aggregated Tests #1031

@ChrisPortman

Description

@ChrisPortman

Description

Consider adding support for high level test aggregates/groups where the group may contain multiple regular tests, and the result of the aggregated test could be specified as "AnyOf", "AllOf" etc.

This would allow a system to pass a test that describes desired higher level functionality that could be implemented in one or more ways.

For context I've been working with Goss in relation to the Ansible Lockdown Audit repositories.

Solution Idea

Something like the following pseudo code:

AnyOf:
  package:
    nginx:
      installed: false 
  service:
      nginx:
        name: nginx
        enabled: false
        running: false

In this case, ensuring nginx is not "running" could be achieved by either not having it installed at all, or if it is installed, the service is disabled. However, specifying each of these tests individually, one of them will always fail.

Bonus if we could nest AnyOf/AllOf tests arbitrarily.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions