testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

[Enhancement]: Support waiting for codes (Exit and HTTP) using integers besides the existing code matchers

Open mdelapenya opened this issue 1 year ago • 0 comments

Proposal

The idea is to add som esugar on top of the existing code matchers:

Instead of this (example using the wait.ForExec strategy):

WithExitCodeMatcher(func(code int) bool {
	return code == 0
})

having this:

WithExitCode(0)

It will internally call the code matcher.

mdelapenya avatar Feb 08 '24 11:02 mdelapenya