testutil: switch etcd helper to go-storage etcdtest#78
Open
bigbes wants to merge 1 commit into
Open
Conversation
192f84d to
cb769ae
Compare
Use go-storage's test_helpers/etcd package (added in v1.5.x) instead of
go.etcd.io/etcd/tests/v3/framework/integration. The new helper is built
on embed and avoids dragging the tests/v3 framework — and its pre-split
google.golang.org/genproto pin — into the module graph.
The public EtcdTestCluster{Storage, Client} shape is unchanged, so the
integration test callers need no edits. As a side effect go.etcd.io/etcd
bumps to v3.6.11 and the direct tests/v3 and client/pkg/v3 dependencies
drop out of go.mod.
The bump also grew three methods on the Storage interface (TxFactory,
NewLocker, LockerFactory); MockStorage gains stubs for them so test
files that pass *MockStorage as storage.Storage still compile. TxFactory
returns m.Tx, NewLocker returns an error (the mock has no distributed-
lock semantics), and LockerFactory wraps NewLocker via locker.FactoryFunc.
cb769ae to
1b5c1a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Use go-storage's test_helpers/etcd package (added in v1.5.x) instead of go.etcd.io/etcd/tests/v3/framework/integration. The new helper is built on embed and avoids dragging the tests/v3 framework — and its pre-split google.golang.org/genproto pin — into the module graph.
The public EtcdTestCluster{Storage, Client} shape is unchanged, so the integration test callers need no edits. As a side effect go.etcd.io/etcd bumps to v3.6.11 and the direct tests/v3 and client/pkg/v3 dependencies drop out of go.mod.