Skip to content

Commit

Permalink
CASMINST-6936 update readme for running goss tests locally
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Salmela <[email protected]>
  • Loading branch information
jacobsalmela committed Nov 19, 2024
1 parent f9aa6a8 commit 01a90a5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions goss-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,29 @@ Use the following command to run a single test or a suite of tests on the local
$ goss -g /opt/cray/tests/install/ncn/tests/[test_file.yaml] --vars /opt/cray/tests/install/ncn/vars/[variable_file.yaml] validate
```

## Running All Test Suites Locally

The goss tests can be executed directly (not via the http endpoint) on any node type using a single script. This will save both a GOSS-formatted JSON file and a DST-compatible JSON file.

It will run any test that is currently part of a suite connected to a GOSS endpoint on that node.

It currently runs *all* available suites, sans the LiveCD/PIT tests. This is used by the CT pipeline to run all tests on a nightly-basis. Future versions of the script, will allow finer-tuned control.

```bash
/opt/cray/tests/install/ncn/automated/dst-ct-results.sh
```

The resulting JSON files can be parsed to get the details.

```shell
# parse the original goss output for failures
jq '.results[] | select(.successful == false)' < /tmp/tmp.XbwecrPyr5 # path from stdout after script execution

# parse the dst-compatible file for failures
jq '.tests[] | select(.status == "fail")' < /tmp/api-results.json # default
```


## Running Tests Remotely

Use the following command to run a suite of tests on a remote machine where there is a running Goss server endpoint.
Expand Down

0 comments on commit 01a90a5

Please sign in to comment.