Skip to content

Commit

Permalink
docs: improvement of the explanation of goss_wait.yaml (#1001)
Browse files Browse the repository at this point in the history
* docs: improvement of the explanation of `goss_wait.yaml`

* fix md lint
  • Loading branch information
dklimpel authored Nov 21, 2024
1 parent 6434d95 commit 43c4e0c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
10 changes: 8 additions & 2 deletions extras/dcgoss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ containers. It is based on `dgoss`.
### Run

Run is used to validate a docker container defined in `docker-compose.yml`. It expects both a `docker-compose.yml`
and `goss.yaml` file to exist in the directory it was invoked from. Container configuration is used from the
compose file, for example:
and `goss.yaml` file to exist in the directory it was invoked from.

If the file `./goss_wait.yaml` exists in the current directory, goss regularly
checks whether the conditions in the file are met. Only then does goss start the
actual check with the file `./goss.yaml`. This is used, for example, to wait
until a certain port is open before executing the tests.

Container configuration is used from the compose file, for example:

**run:**

Expand Down
6 changes: 6 additions & 0 deletions extras/dgoss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ dgoss run ...

Run is used to validate a container.
It expects a `./goss.yaml` file to exist in the directory it was invoked from.

If the file `./goss_wait.yaml` exists in the current directory, goss regularly
checks whether the conditions in the file are met. Only then does goss start the
actual check with the file `./goss.yaml`. This is used, for example, to wait
until a certain port is open before executing the tests.

In most cases one can just substitute the runtime command (`docker` or `podman`)
for the dgoss command, for example:

Expand Down
5 changes: 5 additions & 0 deletions extras/kgoss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ To find `goss.yaml` in another directory specify that directory's path in `GOSS_
The `run` command is used to validate a container. It expects a
`./goss.yaml` file to exist in the directory it was invoked from.

If the file `./goss_wait.yaml` exists in the current directory, goss regularly
checks whether the conditions in the file are met. Only then does goss start the
actual check with the file `./goss.yaml`. This is used, for example, to wait
until a certain port is open before executing the tests.

**Example:**

`kgoss run -e JENKINS_OPTS="--httpPort=8080 --httpsPort=-1" -e JAVA_OPTS="-Xmx1048m" -i jenkins:alpine`
Expand Down

0 comments on commit 43c4e0c

Please sign in to comment.