diff --git a/docs/manual.md b/docs/manual.md index 24ef13bb..296fa510 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -12,6 +12,7 @@ * [render, r \- Render gossfile after importing all referenced gossfiles](#render-r---render-gossfile-after-importing-all-referenced-gossfiles) * [serve, s \- Serve a health endpoint](#serve-s---serve-a-health-endpoint) * [validate, v \- Validate the system](#validate-v---validate-the-system) +* [Goss test creation](#goss-test-creation) * [Important note about goss file format](#important-note-about-goss-file-format) * [Available tests](#available-tests) * [addr](#addr) @@ -322,6 +323,29 @@ $ echo $? 2 ``` +## Goss test creation +Goss tests can be created by using either of following methods. +1. goss autoadd +2. goss add +3. manually create YAML/JSON test file by hand. + +To customize the parameters generated by `goss add` and `goss autoadd` YAML file you need to manually edit it. + +`goss add package nginx` will generate below YAML +``` +package: + nginx: + installed: true + versions: + - 1.17.8 +``` +To test uninstall scenario you would need to manually edit it and set it as below. +``` +package: + nginx: + installed: false +``` + ## Important note about goss file format It is important to note that both YAML and JSON are formats that describe a nested data structure.