Wei Fu
aa97484166
*: enable goimports in verify-lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Marek Siarkowicz
372042c374
refactor: Use proper variable names for urls
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-13 14:48:01 +01:00
Sasha Melentyev
c3b6cbdb73
all: goimports -w .
...
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-17 19:07:04 +03:00
Marek Siarkowicz
07ca384753
tests: Move MustAbsPath function to testutils
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 13:37:14 +02:00
ahrtr
24002fb099
allocate unique port for each member in test cases
2022-04-26 12:32:00 +08:00
Marek Siarkowicz
ca9b720c1d
tests: Move integration setup to separa framework package
2021-10-20 10:34:35 +02:00
Eduardo Patrocinio
87f1dc7e40
Fix a few typos
2021-09-03 16:09:09 -04:00
Marek Siarkowicz
e1b1d93548
*: Snapshot returns local etcd version
...
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-06-14 16:36:50 +02:00
Piotr Tabor
c09aca1ba4
Split etcdctl into etcdctl (public API access) & etcdutl (direct surgery on files)
...
Motivation is as follows:
- etcdctl we only depend on clientv3 APIs, no dependencies of bolt, backend, mvcc, file-layout
- etcdctl can be officially supported across wide range of versions, while etcdutl is pretty specific to file format at particular version.
it's step towards desired modules layout, documented in: https://etcd.io/docs/next/dev-internal/modules/
2021-05-17 11:54:03 +02:00
Piotr Tabor
f5717016cf
Merge pull request #12797 from lzhfromustc/3_23
...
server/etcdmain and tests: Fix goroutine leaks
2021-05-10 08:29:17 +02:00
Piotr Tabor
ffea1537d4
ClientV3 tests use integration.NewClient that configures proper logger.
2021-04-29 18:18:34 +02:00
Piotr Tabor
c4b13a5c83
Integrate verification framework
...
Verification framework is integrated with:
- integration tests (by default)
- `ETCD_VERIFY=all etcdctl snapshot restore` command
- etcd shutdown when running with `ETCD_VERIFY=all` env.
2021-04-28 07:56:16 +02:00
Piotr Tabor
d72f7ef5cc
Give control to Embedded servers whether they override global loggers
...
So far each instance of embed server was overriding the grpc loggers and zap.global loggers.
It's counter intutitive that last created Embedded server was 'wining' and more-over it was breaking grpc expectation to change it "only" before the grpc stack is being used.
This PR introduces explicit call: `embed.Config::SetupGlobalLoggers()`, that changes the loggers where requested. The call is used by etcd main binary.
The immediate benefit from this change is reduction of test flakiness, as there were flakes due to not a proper logger being used across tests.
2021-04-14 12:47:38 +02:00
Piotr Tabor
e776efbb2a
Merge pull request #12828 from ptabor/20210404-embed-etcd
...
embed: etcd.Close() is closing Errc() channel as well.
2021-04-08 01:20:07 +02:00
Piotr Tabor
5da9cac193
embed: etcd.Close() is closing Errc() channel as well.
...
Inspired by https://github.com/etcd-io/etcd/pull/9612 by purpleidea@.
2021-04-08 01:19:13 +02:00
Piotr Tabor
3bb7acc8cf
Migrate dependencies pkg/foo -> client/pkg/foo
2021-04-07 00:38:47 +02:00
lzhfromustc
3de6b382df
server&tests: Fix goroutine leaks
2021-03-23 12:52:59 -04:00
Piotr Tabor
8469108548
Merge pull request #12782 from ptabor/20210316-fixes
...
Integration: Test flakiness fixes
2021-03-19 20:10:11 +01:00
Piotr Tabor
725a8c5e02
Enable configuring delegated zap-logging for embed server.
2021-03-17 08:17:36 +01:00
Piotr Tabor
809e7629ed
Add integration.BeforeTest to all missing tests.
2021-03-16 23:50:01 +01:00
Piotr Tabor
a57e967d84
Integration test flakes fixes.
2021-03-16 16:08:18 +01:00
Piotr Tabor
5ddabfdb24
tests: Make tests operate in /tmp director instead of src.
...
Thanks to this, unix sockets should be not longer
created by integration tests in the the source code directory,
so potentially trigger IDE reloads and unnecessery load (and mess).
2021-03-09 18:19:52 +01:00
Piotr Tabor
aaf423e962
server: Update imports.
...
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +01:00
Piotr Tabor
09679d29ad
etcdctl: Rename of imports after making etcdctl a module.
...
```
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/etcdctl|etcd/etcdctl/v3|g'
```
2020-10-21 11:15:35 +02:00
Piotr Tabor
e33c6dd9df
client/v3: Rename of imports
2020-10-20 10:13:06 +02:00
Piotr Tabor
de55bb6331
pkg: Rename imports after making 'pkg' a module
...
find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
2020-10-13 00:09:27 +02:00
Piotr Tabor
30811a06aa
etcdctl, clientv3/snapshot: snapshot (Restore,Status) code out of client
...
"snapshot" Restore/Status code was the only remaining dependency of client on 'server'
code. The code is solelly used by etcdctl. Long-term the snapshot code
should be migrated to 'etcdadm' style of tool such that we can
distinguish tool solelly depending on networking API vs. tools that
operation on etcd files directly.
We left snapshot.Save() code in clientv3.snapshot package, such that
clients can benefits from automated download&safe to file snapshot
functionality over the wire.
2020-10-10 14:14:57 +02:00
Piotr Tabor
be4e8b7013
integration/fixtures: Move the 'tests/integration/fixtures' directory up and update references.
...
I moved the files up as they are shared between e2e & integrational tests.
2020-10-07 15:38:28 +02:00
Piotr Tabor
bb9703820c
tests/integration: Move of naming/snapshot clientv3 tests (and yaml reference)
...
path change in clientv3/yaml/config_test
git mv clientv3/naming/grpc_test.go tests/integration/clientv3/grpc_test.go
git mv clientv3/snapshot/*_test.go tests/integration/snapshot
git mv clientv3/{main_test.go,example_*.go} tests/integration/clientv3/examples/
2020-10-07 15:37:24 +02:00
Piotr Tabor
3153038ffb
tests/integration: Moving integration tests to tests/integration directory
...
git mv integration ./tests
git mv client/integration/* ./tests/integration/client
git mv clientv3/integration/* ./tests/integration/clientv3
git mv client/example_keys_test.go client/main_test.go tests/integration/client/examples
git mv clientv3/concurrency/*_test.go tests/integration/clientv3/concurrency
git mv etcdserver/api/v2store/store_v2v3_test.go etcdserver/api/v2v3/*_test.go tests/integration/v2store
git mv tests/integration/v2store/store_v2v3_test.go tests/integration/v2store/store_v2v3.go
git mv tests/integration/v2store/store_test.go tests/integration/v2store/store_v2v3_test.go
git mv etcdserver/api/v2store/store_test.go tests/integration/v2store
git mv etcdserver/api/v2store/store_v2_test.go tests/integration/v2store
git mv proxy/grpcproxy/*_test.go tests/integration/proxy/grpcproxy
git mv ./clientv3/snapshot/testdata ./clientv3/snapshot/*_test.go ./tests/integration/snapshot
2020-10-07 15:36:21 +02:00