kvdb/etcd: remove context.TODO() from test helpers

We want `context.TODO()` to be high signal in the code-base. It should
signal clearly that work is required to thread parent context through to
the call-site. So to keep the signal-to-noise ratio high, we remove any
context.TODO() calls from tests since these will never need to be
replace by a parent context.

After this commit, there is only a single context.TODO() left in the
code-base.
This commit is contained in:
Elle Mouton
2025-04-07 10:49:41 +02:00
committed by ziggie
parent 54f6b16f01
commit 76d2bec58f
5 changed files with 15 additions and 9 deletions

View File

@@ -274,7 +274,7 @@ func GetTestBackend(path, name string) (Backend, func(), error) {
return nil, empty, err
}
backend, err := Open(
EtcdBackendName, context.TODO(), etcdConfig,
EtcdBackendName, context.Background(), etcdConfig,
)
return backend, cancel, err