philippgille / gokv

Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)
Mozilla Public License 2.0
746 stars 69 forks source link

Add Docker health checks to Consul and Memcached #168

Closed philippgille closed 9 months ago

philippgille commented 10 months ago

Following the initial PR that added health checks, an improvement in https://github.com/philippgille/gokv/pull/162 and the use of the health checks in https://github.com/philippgille/gokv/pull/154, we should use the health checks in as many test containers as possible, to benefit from the mechanism and reduce build time in CI.

This PR adds health checks for Consul and Memcached.

As their images don't have the necessary tooling installed by default, and we don't want to execute the main server process as root, we instead run a separate docker exec command to install the required tooling, while the health checks are already running (but running into errors like "curl not found").

codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (128881d) 63.64% compared to head (b6e6e82) 63.64%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #168 +/- ## ======================================= Coverage 63.64% 63.64% ======================================= Files 25 25 Lines 2107 2107 ======================================= Hits 1341 1341 Misses 651 651 Partials 115 115 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.