Skip to content

Commit

Permalink
Improving docs about test script creation (#560)
Browse files Browse the repository at this point in the history
* Adding in information about test script creation in docs

* Update docs/manual.md

Updated suggestion

Co-Authored-By: Pedro Medeiros <13643195+pedroMMM@users.noreply.github.com>

* Update docs/manual.md

Updated suggestion

Co-Authored-By: Pedro Medeiros <13643195+pedroMMM@users.noreply.github.com>

* Update docs/manual.md

Updated suggestion

Co-Authored-By: Pedro Medeiros <13643195+pedroMMM@users.noreply.github.com>

* Update docs/manual.md

Updated suggestion.

Co-Authored-By: Pedro Medeiros <13643195+pedroMMM@users.noreply.github.com>

Co-authored-by: Pedro Medeiros <13643195+pedroMMM@users.noreply.github.com>
  • Loading branch information
shan100github and pedroMMM committed Mar 23, 2020
1 parent a17ce0f commit 60c3395
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/manual.md
Expand Up @@ -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)
Expand Down Expand Up @@ -322,6 +323,29 @@ $ echo $?
2
```
## Goss test creation
Goss tests can be created by using either of following methods.
1. goss autoadd <resource to test>
2. goss add <resource to test>
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.
Expand Down

0 comments on commit 60c3395

Please sign in to comment.