feat: add K2V_ENDPOINT env var

This commit is contained in:
Milas Bowman 2025-03-09 20:51:43 -04:00
parent 97bedfe1aa
commit 231423cd0b
Signed by: milas
SSH key fingerprint: SHA256:ek2D5l1HA34B3wbdErz0QOXm1E46CVvyf/nM4Fwfx/U
3 changed files with 20 additions and 6 deletions

View file

@ -13,8 +13,6 @@ import (
"go.uber.org/goleak"
)
const endpoint = "http://127.0.0.1:3904"
type fixture struct {
t testing.TB
ctx context.Context
@ -31,7 +29,7 @@ func newFixture(t testing.TB) (*fixture, context.Context) {
ctx := testContext(t)
cli := k2v.NewClient(endpoint, k2v.KeyFromEnv())
cli := k2v.NewClient(k2v.EndpointFromEnv(), k2v.KeyFromEnv())
t.Cleanup(cli.Close)
f := &fixture{