Skip to content
Permalink
Browse files

Improving docs about test script creation (#560)

* 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 60c339519a8ea46345e10421bee25d26a62d12f6
Showing with 24 additions and 0 deletions.
  1. +24 −0 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 <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.

0 comments on commit 60c3395

Please sign in to comment.
You can’t perform that action at this time.