Chao Chen
a1aaa51cf1
add uds test cases into e2e TestAuthority
...
Signed-off-by: Chao Chen <chaochn@amazon.com>
2024-02-19 13:26:15 +00:00
Marek Siarkowicz
00e1e5db21
tests: Backport tls for etcdctl
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-17 10:50:19 +01:00
Hitoshi Mitake
528dd82be9
tests: a test case for watch with auth token expiration
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-03 23:08:23 +09:00
Marek Siarkowicz
a56ec0be4b
tests: Cover periodic check in tests
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-07 15:11:56 +02:00
ahrtr
bc5307de95
support linearizable renew lease
...
When etcdserver receives a LeaseRenew request, it may be still in
progress of processing the LeaseGrantRequest on exact the same
leaseID. Accordingly it may return a TTL=0 to client due to the
leaseID not found error. So the leader should wait for the appliedID
to be available before processing client requests.
2022-04-12 14:12:45 +08:00
Chao Chen
f634b44046
backport 3.5: #13676 load all leases from backend
2022-02-22 10:21:04 -08:00
Marek Siarkowicz
d00e89db2e
server: Require either cluster version v3.6 or --experimental-enable-lease-checkpoint-persist to persist lease remainingTTL
...
To avoid inconsistant behavior during cluster upgrade we are feature
gating persistance behind cluster version. This should ensure that
all cluster members are upgraded to v3.6 before changing behavior.
To allow backporting this fix to v3.5 we are also introducing flag
--experimental-enable-lease-checkpoint-persist that will allow for
smooth upgrade in v3.5 clusters with this feature enabled.
2021-12-02 16:54:10 +01:00
Marek Siarkowicz
58d2b12a50
client: Add grpc authority header integration tests
2021-09-30 12:15:32 +02:00
Marek Siarkowicz
6e04e8ae42
tests: Allow configuring integration tests to use TCP
2021-09-30 12:05:25 +02:00
Marek Siarkowicz
7272a9585d
test: Use unique number for grpc port
2021-09-30 12:05:15 +02:00
Marek Siarkowicz
0bac49bda4
tests: Cleanup member interface by exposing Bridge directly
2021-09-30 12:05:10 +02:00
Marek Siarkowicz
f324894e8f
tests: Make using bridge optional
2021-09-30 12:05:04 +02:00
Marek Siarkowicz
994bd08723
tests: Rename grpcAddr to grpcURL to imply that it includes schema
2021-09-30 12:04:57 +02:00
Marek Siarkowicz
c1f48d8077
tests: Remove bridge dependency on unix
2021-09-30 12:04:50 +02:00
Piotr Tabor
3f13d3a2d5
integration.BeforeTest can be run without leak-detection.
2021-05-28 10:01:36 +02:00
Piotr Tabor
ead81df948
Disallow -v2-deprecation>'not-yet' combined with --enable-v2
2021-05-12 18:09: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
fad6391745
Configure proper logging for grpc integration tests.
2021-04-14 12:47:38 +02:00
Piotr Tabor
3bb7acc8cf
Migrate dependencies pkg/foo -> client/pkg/foo
2021-04-07 00:38:47 +02: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
18321a0c85
Merge pull request #12786 from ptabor/20210318-debug-env
...
client: Bring back ETCD_CLIENT_DEBUG variable interpretation.
2021-03-18 21:55:51 +01:00
Piotr Tabor
9312d1b077
clientv3: Bring back ETCD_CLIENT_DEBUG variable interpretation.
...
env ETCD_CLIENT_DEBUG supports log levels (debug, info, warn, error, dpanic, panic, fatal).
Only when set, overrides application-wide grpc logging settings.
2021-03-18 18:43:07 +01:00
wpedrak
dac6e37ea1
*: over 20 staticcheck fixes
2021-03-18 15:06:17 +01:00
Piotr Tabor
6657d5907c
Make sure all integration tests have BeforeTest.
...
The CL disallows to create NewCluster in tests without BeforeTest.
2021-03-16 23:50:01 +01:00
Piotr Tabor
a84bd093b0
Integration with grpc-settable logger.
2021-03-16 22:50:41 +01:00
Piotr Tabor
fd7fed1511
Move config (ServerConfig) out of etcdserver package.
...
Motivation:
- ServerConfig is part of 'embed' public API, while etcdserver is more 'internal'
- EtcdServer is already too big and config is pretty wide-spread leaf
if we were to split etcdserver (e.g. into pre & post-apply part).
2021-03-11 20:56:22 +01:00
Piotr Tabor
b6c2e87a74
Testing: Integration tests does not check whether t==nil
2021-03-09 18:19:52 +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
bfe02c0526
tests: Cluster creation that failed shouldn't leak goroutines.
2021-03-09 18:19:52 +01:00
Piotr Tabor
87258efd90
Integration tests: Use zaptest.Logger based testing.TB
...
Thanks to this the logs:
- are automatically printed if the test fails.
- are in pretty consistent format.
- are annotated by 'member' information of the cluster emitting them.
Side changes:
- Set propert default got DefaultWarningApplyDuration (used to be '0')
- Name the members based on their 'place' on the list (as opposed to
'random')
2021-03-09 18:19:51 +01:00
Piotr Tabor
102c198444
Merge pull request #12705 from astromechza/bm_etcd_peer_server_cert
...
etcdmain: added peer-client-{client,key}-file parameters for supporting separate client and server certs when communicating between peers
2021-03-02 09:03:35 +01:00
Piotr Tabor
5e10d12996
tests: Fixes a few recently spotted test-flakes
...
```
Unexpected goroutines running after all test(s).
1 instances of:
syscall.Syscall(...)
/usr/local/go/src/syscall/asm_linux_386.s:19 +0x5
syscall.Close(...)
/usr/local/go/src/syscall/zsyscall_linux_386.go:285 +0x3d
internal/poll.(*FD).destroy(...)
/usr/local/go/src/internal/poll/fd_unix.go:77 +0x30
internal/poll.(*FD).decref(...)
/usr/local/go/src/internal/poll/fd_mutex.go:213 +0x38
internal/poll.(*FD).Close(...)
/usr/local/go/src/internal/poll/fd_unix.go:99 +0x43
net.(*netFD).Close(...)
/usr/local/go/src/net/fd_posix.go:37 +0x49
FAIL go.etcd.io/etcd/tests/v3/integration/client 0.039s
```
```
--- FAIL: TestServer_TCP_Secure_DelayTx (0.20s)
server_test.go:110: took 128.026085ms with no latency
server_test.go:125: took 62.980988ms with latency 50ms��5ms
server_test.go:133: expected took1 128.026085ms < took2 62.980988ms (with latency)
```
https://github.com/etcd-io/etcd/issues/12372
2021-03-01 18:07:38 +01:00
Ben Meier
3d44f5bf80
*: added client-{client,key}-file parameters for supporting separate client and server certs when communicating between peers
...
In some environments, the CA is not able to sign certificates with both
'client auth' and 'server auth' extended usage parameters and so an operator
needs to be able to set a seperate client certificate to use when making
requests which is different to the certificate used for accepting requests.
This applies to both proxy and etcd member mode and is available as both a CLI
flag and config file field for peer TLS.
Signed-off-by: Ben Meier <ben.meier@oracle.com>
2021-02-28 14:37:56 +00:00
Piotr Tabor
4a1c24556c
clientv3: PS: Replace balancer with upstream grpc solution
...
Addresses comments from: https://github.com/etcd-io/etcd/pull/12671#pullrequestreview-593942302
2021-02-23 10:03:15 +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
45b007b8b4
contrib,clientv3: Move contrib/recipies to clientv3/experimental/recipies/...
...
Recipies is set of patterns / primitives implementation on top of clientv3.
It's used by integration tests. It shouldn't be considered "server" code.
2020-10-22 11:10:07 +02:00
Piotr Tabor
e33c6dd9df
client/v3: Rename of imports
2020-10-20 10:13:06 +02:00
Piotr Tabor
45e4306508
client: Move client to client/v2 as a module.
...
We make v2 client code a module go.etcd.io/etcd/client/v2.
Pretty mechanical change that can be summarized as:
mkdir client/v2
cd client/v2 && git mod init go.etcd.io/etcd/client/v2
git mv client/*.go client/v2/
find -name '*.go' | xargs sed -i --follow-symlinks 's|/v3/client["]|/client/v2\"|g'
+ fixing changelog, bom, go.mod etc.
2020-10-15 14:39:43 +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
f67956cb7a
clientv3: Expose clientv3/examples close to the code.
...
Many of the tests had missing '// Output:' comment, so were not
runnable. They required fining.
2020-10-08 14:27:32 +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
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