diff --git a/docs/features/wait/introduction.md b/docs/features/wait/introduction.md index 87adabc3ed..145854f281 100644 --- a/docs/features/wait/introduction.md +++ b/docs/features/wait/introduction.md @@ -25,3 +25,8 @@ If the default 60s timeout is not sufficient, it can be updated with the `WithSt Besides that, it's possible to define a poll interval, which will actually stop 100 milliseconds the test execution. If the default 100 milliseconds poll interval is not sufficient, it can be updated with the `WithPollInterval(pollInterval time.Duration)` function. + +## Modifying request strategies + +It's possible for options to modify `ContainerRequest.WaitingFor` using +[Walk](sql.md). diff --git a/docs/features/wait/walk.md b/docs/features/wait/walk.md index d69c942631..f8db724cc0 100644 --- a/docs/features/wait/walk.md +++ b/docs/features/wait/walk.md @@ -2,11 +2,18 @@ Walk walks the strategies tree and calls the visit function for each node. +This allows modules to easily amend default wait strategies, updating or +removing specific strategies based on requirements of functional options. + +For example removing a TLS strategy if a functional option enabled insecure mode +or changing the location of the certificate based on the configured user. + If visit function returns `wait.VisitStop`, the walk stops. If visit function returns `wait.VisitRemove`, the current node is removed. ## Walk removing entries +The following example shows how to remove a strategy based on its type. -[Walk a strategy and remove the all FileStrategy entries found](../../../wait/walk_test.go) inside_block:walkRemoveFileStrategy +[Remove FileStrategy entries](../../../wait/walk_test.go) inside_block:walkRemoveFileStrategy diff --git a/mkdocs.yml b/mkdocs.yml index f8decf74ed..e4b57c4b75 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -64,6 +64,7 @@ nav: - Log: features/wait/log.md - Multi: features/wait/multi.md - SQL: features/wait/sql.md + - Walk: features/wait/walk.md - Modules: - modules/index.md - modules/artemis.md