Try to fix flakey integration tests, also update the definition of notary server health #952
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Integration tests have been failing lately - it seems it's because the server comes up before the signer, and the integration tests start before the server manages to connect to the signer.
This fix should hopefully cause the tests to wait until the server is healthy for sure, so they might take longer to start.
This also changes the definition of notary server health - previously it was healthy but degraded if the signer is down - not it's just unhealthy, because we cannot do any writes.
An alternate approach is to just have a separate endpoint to see whether it runs in degraded mode, or use a different health package that supports "warning" or degraded mode without necessarily failing the health check entirely.