Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix json #841

Merged
merged 4 commits into from
Sep 14, 2023
Merged

Fix json #841

merged 4 commits into from
Sep 14, 2023

Conversation

aelsabbahy
Copy link
Member

Checklist
  • make test-all (UNIX) passes. CI will also test this
  • unit and/or integration tests are included (if applicable)
  • documentation is changed or added (if applicable)

Description of change

Fixes bug in #840

This was a regression from goss 3 -> 4

# file: goss.yaml
command:
  Always-succeeds:
    exec: /bin/true
    exit-status: 0
  Always-fails:
    exec: /bin/false
    exit-status: 0
$ goss.3.18 v -f json | jq '.results[]| {"resource-id", successful}' -c|sort
{"resource-id":"Always-fails","successful":false}
{"resource-id":"Always-succeeds","successful":true}

$ goss v -f json | jq '.results[]| {"resource-id", successful}' -c|sort
{"resource-id":"Always-fails","successful":false}
{"resource-id":"Always-succeeds","successful":true}

Note: SKIPPED is considered success, this matches goss 3.x behavior

The idea behind this commit is to set the stage for adding aditional
logging metadata.
* Added new flags `--log-level` and `-l` to be consistent with other goss
flags.
  * `--loglevel` and `-L` will be deprecated in a future release
* Log level accepts any casing, so DEBUG and debug are both valid cli opts
* Add log level support for `add` and `autoadd` commands
@aelsabbahy aelsabbahy merged commit b1ffb25 into master Sep 14, 2023
1 check passed
@aelsabbahy aelsabbahy deleted the fix_json branch September 14, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant