Skip to content

Commit

Permalink
Add origin readiness client (#374)
Browse files Browse the repository at this point in the history
As described in #371, all services should implement a "readiness" endpoint, which checks whether the service is ready to serve traffic, i.e. whether it can reach all of its dependencies.

- Add a client for the origin's readiness endpoint.
- Additionally, add a ClusterClient (a client which abstracts which origin from the cluster is called).
- Rework the readiness test to use the client instead of directly calling the endpoint. Also, make each test case run separately (by using t.Run instead of just looping) to follow idiomatic Go.
  • Loading branch information
Anton-Kalpakchiev authored Nov 15, 2024
1 parent b035e11 commit 3b1b193
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 166 deletions.
1 change: 1 addition & 0 deletions lib/backend/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ const (
var (
ReadinessCheckNamespace string = core.NamespaceFixture()
ReadinessCheckName string = core.DigestFixture().Hex()
ReadinessCheckDigest, _ = core.NewSHA256DigestFromHex(ReadinessCheckName)
)
182 changes: 101 additions & 81 deletions mocks/origin/blobclient/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3b1b193

Please sign in to comment.