Releases: goss-org/goss
v0.4.9
What's Changed
- ci: add integration tests for windows and macOS by @dklimpel in #950
- fix(ci): rework get latest tag for build Docker image by @dklimpel in #954
- docs: fix links to documentation (https://goss.readthedocs.io) and bump version examples by @dklimpel in #958
- ci: bump httpd in rockylinux9 by @dklimpel in #961
- Build own docker images for integration tests by @dklimpel in #901
- add md5 checksum of dockerfiles to image labels by @dklimpel in #967
- fix: convert line endings of Dockerfile to linux by @dklimpel in #952
- use variables to set container registry and repository in scripts by @dklimpel in #968
- Bump docker/build-push-action from 5 to 6 by @dependabot in #943
- Add Github action to build release artifacts by @dklimpel in #916
- Update dependencies by @ripienaar in #974
- Changed: updated build-push-actions v5->v6 by @aelsabbahy in #980
- bump to go 1.23 to fix cve (fixes #973) by @aelsabbahy in #983
Full Changelog: v0.4.8...v0.4.9
v0.4.8
What's Changed
- regexFirstGroup return first group from regexp, useful with .env file… by @alexandregz in #895
- go: bump version on 1.22 by @ikheifets-splunk in #953
Internal Development related changes
Many many thanks to @dklimpel for all the massive effort improving CI!
- Fix building mkdocs by @dklimpel in #900
- Update docs to fix linting issues by @dklimpel in #904
- fix path pattern in documentation pipeline by @dklimpel in #919
- Bump mkdocs-material from 9.5.3 to 9.5.23 in /docs by @dependabot in #917
- Bump pygments from 2.17.2 to 2.18.0 in /docs by @dependabot in #918
- Add github golang lint CI pipeline by @dklimpel in #899
- bump alpine linux to 3.19 by @dklimpel in #907
- fix some linting failures and configure golangci-lint by @dklimpel in #922
- Update docs to fix linting issues by @dklimpel in #930
- fix link to codeclimate in docs by @dklimpel in #926
- disable deprecated codeclimate plugin golint by @dklimpel in #927
- fix integration tests for alpine3 by @dklimpel in #937
- Pushed new integration test images and update image md5 by @aelsabbahy in #938
- Add pipeline for build goss docker image by @dklimpel in #909
- add unit tests to ci by @dklimpel in #928
- remove Code Climate from project by @dklimpel in #933
- docs: Update and more general wording for "docker container" by @dklimpel in #934
- ci: add integation tests to GHA CI by @dklimpel in #946
- Replace centos7 with rockylinux9 in integration-tests by @dklimpel in #906
- Replace deprecated MAINTAINER with LABEL in Dockerfiles by @dklimpel in #949
- Add labels to container images when build with build_images.sh by @dklimpel in #948
- Fixed: the user-agent test on release builds by @aelsabbahy in #955
- Fix test file for release by @aelsabbahy in #956
New Contributors
- @ikheifets-splunk made their first contribution in #953
Full Changelog: v0.4.7...v0.4.8
v0.4.7
What's Changed
- Update travis-ci build image and revert docs link by @aelsabbahy in #888
- Point install.sh to latest binary by @aelsabbahy in #889
- s/during during/during/ by @alexandregz in #893
- Fixed: security findings by @aelsabbahy in #905
- add a default user-agent header by @catdevman in #892
- Add new runtime environment variable to dgoss to copy additional files by @dklimpel in #898
- documentation: dgoss on mac needs DGOSS_TEMP_DIR by @rasschaert in #873
New Contributors
- @alexandregz made their first contribution in #893
- @catdevman made their first contribution in #892
- @dklimpel made their first contribution in #898
Full Changelog: v0.4.5...v0.4.7
v0.4.6
What's Changed
- "socket" as one more valid filetype for "file" testing by @fruit in #858
- fix outcome label in goss_tests_run_outcomes_total by @sebhoss in #860
- Bump golang.org/x/crypto from 0.14.0 to 0.17.0 by @dependabot in #861
- add more labels to prometheus output by @sebhoss in #864
- kgoss: fixes issue #868 bei using a simpler chmod command by @erkules in #869
- feat: s390x build option added to build package for IBM Z series by @harpaldhillon in #863
- IDE json schema: skip is not mandatory for process tests by @rasschaert in #874
- Added: MkDocs documentation by @noirbizarre in #856 (note: not yet live)
- Added timeout for mount command in goss by @melvilgit in #877
- Update dependencies and move to go 1.21 by @ripienaar in #879
- docs: remove Molecule from contributions section by @retr0h in #881
- Update prometheus package to fix dependabot finding by @aelsabbahy in #887
- Add uid/gid check in file module by @smutel in #883
New Contributors
- @fruit made their first contribution in #858
- @sebhoss made their first contribution in #860
- @erkules made their first contribution in #869
- @harpaldhillon made their first contribution in #863
- @rasschaert made their first contribution in #874
- @noirbizarre made their first contribution in #856
- @melvilgit made their first contribution in #877
- @smutel made their first contribution in #883
Full Changelog: v0.4.4...v0.4.6
v0.4.4
What's Changed
- Fixed: Return the error when a command fails to start by @aelsabbahy in #855
Full Changelog: v0.4.3...v0.4.4
v0.4.3
What's Changed
- Fix: panic in http test when url is invalid by @aelsabbahy in #842
- added DGOSS_TEMP_DIR environment variable. by @ksaito1125 in #684
- Added: warning when duplicate keys cause tests to be overwritten by @aelsabbahy in #843
- Implement log feedback and fix broken CI by @aelsabbahy in #844
- Fixed: junit and json output bug causing panic by @aelsabbahy in #849
- Bump golang.org/x/net from 0.14.0 to 0.17.0 by @dependabot in #851
- Added: found-elements to json output by @aelsabbahy in #852
New Contributors
- @ksaito1125 made their first contribution in #684
Full Changelog: v0.4.2...v0.4.3
v0.4.2
What's Changed
- Added ctx object to all system struct's constructors by @aelsabbahy in #837
- Changed: Reworded syntax error messages to be clearer by @aelsabbahy in #838
- Fix json by @aelsabbahy in #841
- Command empty strings by @aelsabbahy in #839
Full Changelog: v0.4.1...v0.4.2
v0.4.1
Features
What's Changed
- Added: goss-darwin-arm64 binary to release by @aelsabbahy in #835
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Features
Thanks to all the contributors who have helped with this.
Summary:
- Goss v0.4.X introduces some major enhancements to the matching logic allowing far more flexibility for asserts.
- For example, can assert that the output of
echo "3"
is less than 5.
- For example, can assert that the output of
- Introduces some minor breaking changes (see below)
- v4 migration guide - Please submit issues/PRs if anything ewas missed in the migration guide
Matcher change
v4 introduced the ability to compare different types and more advanced string matching. See matchers section in the manual for more information.
For example:
command:
echo_test:
# command that outputs JSON, but this could be anything, http response, command output, etc
exec: |
echo '{"string_value": "15"}'
exit-status: 0
stdout:
# advanced string parsing
gjson:
# extract "string_value"
string_value:
and:
# The value is numerically <= 20 (auto type conversion)
- le: 20
# The value is numerically 15
- 15
# Equal does a strict check, the types have to match, hence string_value is "15" but not 15
- equal: "15"
- not: {equal: 15}
This conversion also allows treating an io.Reader (memory efficient line-by-line parsing) as a whole string (when compared with a string). This has the benefit of showing the full command output, which was a long-requested feature. For example:
$ cat goss.yaml
command:
echo_test:
exec: |
echo 'hello world'
exit-status: 0
stdout: |
goodbye world
$ goss v
.F
Failures/Skipped:
Command: echo_test: stdout:
Expected
"hello world\n"
to equal
"goodbye world\n"
Total Duration: 0.001s
Count: 2, Failed: 1, Skipped: 0
Breaking changes
- Changed:
file.Contains
->file.Contents
- Changed: RPM Version is now full EVR (
-qf "%|EPOCH?{%{EPOCH}:}:{}|%{VERSION}-%{RELEASE}
), this opens the door for proper rpm version comparison in the future - For array matches (ex.
user.Groups
) duplicate entries will raise an error if they don't exist in the system.
In goss 3.X this would succeed:
user:
xxx:
exists: true
groups:
- foo
- wheel
- wheel
Now it will throw an error unless groups actually contain 2 copies of "wheel" in its response array from the system.
You can mimic the old behavior by modifying the test as follows:
user:
xxx:
exists: true
groups:
and:
- contain-element: foo
- contain-element: wheel
- contain-element: wheel
- Goss is more aware of types with goss v4, so ensure when doing string matching that integers and floats are surrounded by double quotes.
For example, this no longer works:
command:
echo "123":
exit-status: 0
stdout:
- 123
New way:
command:
echo "123":
exit-status: 0
stdout:
- "123"
Changes
- Added: transforms support (closes #538)
- Allows comparison of string to int, ex: ensuring a systctl output below/above a specific number (closes #220)
- Allows JSON parsing/validation support (closes #578)
- Allows comparing command output to a string, this will display the failed output on failure (closes #483)
-o include_raw
will show the non-transformed value
- Added: Some new matchers
equal
matcher added to do strict type comparison (e.x. string to string)contain-substring
have-patterns
- This mimics the existing default behavior of file contents and command outputcontain-elements
- checks that an array value matches a set of matchers
- Added: runlevels support for service
- Added: option to sort output (closes #416)
- Added: All resources now support key override (closes #518, closes #742)
- Added: Use exit code 78 if test file is unparseable (closes #317)
- Changed: removed alpha from non-linux binary names
- Changed: StartTime is no longer calculated from goss start. Calculated from first test start, this allows accurate reporting when showing a cached result
- Changed: Completely re-worked matchers and shared output logic
- Changed: Cache test results in serve instead of output (closes #612)
- Added: Significantly improved test coverage of matcher, output code
- Changed: Doc to reference
cat -E /proc/<PID>/comm
to avoid whitespace issues (closes #762) - Changed: Removed file.Size from autoadd (closes #262)
- Added:
matcher.as-reader
this allows the matcher string to behave as an io.Reader output. Can be useful for testing - Removed:
json_online
output format, use:goss v -f json -o oneline
- Added: windows and darwin alpha binaries back in the release (#829)
- Added: string diff support (#827)
- Added: mount
vfs-opts
support (#826)
v0.4.0-rc.3
Features
Special thanks to @matsuo for fixing the darwin/windows alpha release process
Summary:
- Goss v0.4.X introduces some major enhancements to the matching logic allowing far more flexibility for asserts.
- For example, can assert that the output of
echo "3"
is less than 5.
- For example, can assert that the output of
- Introduces some minor breaking changes (see below)
Since v0.4.0-rc.1
- Added: windows and darwin alpha binaries back in the release (#829)
- Added: string diff support (#827)
- Changed: split ops and
vfs-opts
(#826)- Note: this effectively removes the
mount.opts
breaking change when upgrading from v0.3.X
- Note: this effectively removes the
Matcher change
v4 introduced the ability to compare different types and more advanced string matching. See matchers section in the manual for more information.
For example:
command:
echo_test:
# command that outputs JSON, but this could be anything, http response, command output, etc
exec: |
echo '{"string_value": "15"}'
exit-status: 0
stdout:
# advanced string parsing
gjson:
# extract "string_value"
string_value:
and:
# The value is numerically <= 20 (auto type conversion)
- le: 20
# The value is numerically 15
- 15
# Equal does a strict check, the types have to match, hence string_value is "15" but not 15
- equal: "15"
- not: {equal: 15}
This conversion also allows treating an io.Reader (memory efficient line-by-line parsing) as a whole string (when compared with a string). This has the benefit of showing the full command output, which was a long-requested feature. For example:
$ cat goss.yaml
command:
echo_test:
exec: |
echo 'hello world'
exit-status: 0
stdout: |
goodbye world
$ goss v
.F
Failures/Skipped:
Command: echo_test: stdout:
Expected
"hello world\n"
to equal
"goodbye world\n"
Total Duration: 0.001s
Count: 2, Failed: 1, Skipped: 0
Breaking changes
- Changed:
file.Contains
->file.Contents
- Changed: RPM Version is now full EVR (
-qf "%|EPOCH?{%{EPOCH}:}:{}|%{VERSION}-%{RELEASE}
), this opens the door for proper rpm version comparison in the future - For array matches (ex.
user.Groups
) duplicate entries will raise an error if they don't exist in the system.
In goss 3.X this would succeed:
user:
xxx:
exists: true
groups:
- foo
- wheel
- wheel
Now it will throw an error unless groups actually contain 2 copies of "wheel" in its response array from the system.
You can mimic the old behavior by modifying the test as follows:
user:
xxx:
exists: true
groups:
and:
- contain-element: foo
- contain-element: wheel
- contain-element: wheel
- Goss is more aware of types with goss v4, so ensure when doing string matching that integers and floats are surrounded by double quotes.
For example, this no longer works:
command:
echo "123":
exit-status: 0
stdout:
- 123
New way:
command:
echo "123":
exit-status: 0
stdout:
- "123"
Changes
- Added: transforms support (closes #538)
- Allows comparison of string to int, ex: ensuring a systctl output below/above a specific number (closes #220)
- Allows JSON parsing/validation support (closes #578)
- Allows comparing command output to a string, this will display the failed output on failure (closes #483)
-o include_raw
will show the non-transformed value
- Added: Some new matchers
equal
matcher added to do strict type comparison (e.x. string to string)contain-substring
have-patterns
- This mimics the existing default behavior of file contents and command outputcontain-elements
- checks that an array value matches a set of matchers
- Added: runlevels support for service
- Added: option to sort output (closes #416)
- Added: All resources now support key override (closes #518, closes #742)
- Added: Use exit code 78 if test file is unparseable (closes #317)
- Changed: removed alpha from non-linux binary names
- Changed: StartTime is no longer calculated from goss start. Calculated from first test start, this allows accurate reporting when showing a cached result
- Changed: Completely re-worked matchers and shared output logic
- Changed: Cache test results in serve instead of output (closes #612)
- Added: Significantly improved test coverage of matcher, output code
- Changed: Doc to reference
cat -E /proc/<PID>/comm
to avoid whitespace issues (closes #762) - Changed: Removed file.Size from autoadd (closes #262)
- Added:
matcher.as-reader
this allows the matcher string to behave as an io.Reader output. Can be useful for testing - Removed:
json_online
output format, use:goss v -f json -o oneline