49db50c117
Merge pull request #14663 from ahrtr/auth_20221031
...
auth: check permission when performing maintainenence operations if auth is enabled
2022-11-05 23:13:29 +09:00
dc0273b049
test: refactor the struct to make it clearer
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-11-04 19:28:32 +08:00
f782891246
test: added auth test on maintenance API
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-11-03 04:39:42 +08:00
1791ab5754
test: add common functions for auth test
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-11-03 04:39:42 +08:00
fa9ee5cce9
tests: TestRunner.NewCluster accepts options
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-10-31 15:26:08 +08:00
e28b66f751
tests: add a ClusterOption interface for ClusterSize in config.ClusterConfig
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-10-26 23:41:09 +08:00
5550041633
Merge pull request #14629 from clarkfw/fix-anti-pattern-naming
...
test: fix anti-pattern naming problem in config.ClusterConfig
2022-10-26 20:01:43 +08:00
08284c56e0
test: fix anti-pattern naming problem in config.ClusterConfig
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-10-26 15:47:19 +08:00
42cfb74b4c
test: define a default WithAuth to resolve error Unresolved reference 'WithAuth' from IDE
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-10-26 14:30:47 +08:00
3ee2f5711e
test: add common function "WithAuth"
...
We defines two common `WithAuth` functions for e2e and integration
test respectively. They are calling `integration.WithAuth` and
`e2e.WithAuth` respectively.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-10-25 02:41:49 +08:00
4e0ccc69c9
test: refactor the client interface
...
It doesn't make sense to always pass a AuthConfig parameter for
test cases which do not enable auth at all. So refactoring the
Client interface method so that it accepts a `ClientOption`
variadic parameter.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-10-24 19:04:34 +08:00
8d057ea2b8
common tests framework: cluster client creation fail with invalid auth
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2022-09-29 23:09:32 -07:00
159ed15afc
Merge pull request #14479 from demoManito/fix/declaring-empty-slice
...
etcd: modify declaring empty slices
2022-09-20 05:22:59 +08:00
d657f2f66b
Test: increase the TestKVDelete's timeout to 15s
...
Sometimes it just needs more time to execute the test case,
so increase the timeout from 10s to 15s.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-09-18 04:26:30 +08:00
72cf0cc04a
etcd: modify declaring empty slices
...
declare an empty slice to var s []int replace s :=[]int{}, https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices
Signed-off-by: demoManito <1430482733@qq.com >
2022-09-16 14:41:14 +08:00
6a5dd09fe6
tests: Migrate member remove tests to common framework
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-09-09 15:09:10 +08:00
f0c95cadea
Merge pull request #14281 from clarkfw/migrate-member-add-tests
...
tests: Migrate member add tests to common framework
2022-09-06 09:27:28 +02:00
fcc076fb78
tests: Migrate member add tests to common framework
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-09-06 11:02:54 +08:00
cc840336f0
move consistent_index forward when executing alarmList operation
...
The alarm list is the only exception that doesn't move consistent_index
forward. The reproduction steps are as simple as,
```
etcd --snapshot-count=5 &
for i in {1..6}; do etcdctl alarm list; done
kill -9 <etcd_pid>
etcd
```
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-09-05 10:05:55 +08:00
46fe4b8e1c
tests: Rename common client lease methods to match
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-08-26 07:12:47 +02:00
72bec6fbc2
tests: Add context to common client interface
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-08-26 07:12:45 +02:00
f6ed36372b
tests: Migrate watch test to common framework
...
Signed-off-by: nic-chen <chenjunxu6@gmail.com >
2022-08-22 21:55:57 +08:00
a5409c62e6
tests: add WaitLeader function to common framework
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-08-11 12:46:40 +08:00
7fa88fb8f7
tests: fix status responses size and nil
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-08-03 03:10:45 +08:00
13d20f8d28
tests: Migrate member list tests to common framework
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-07-26 23:28:19 +08:00
ee08770bfb
tests: Make common framework context aware
2022-05-16 14:35:44 +02:00
9beb29916e
tests: Extract cluster test cases
2022-05-13 14:41:53 +02:00
55f0c96fa0
tests: Migrate Txn tests to common functional test framework
2022-05-11 10:33:47 +05:30
e004c91d36
migrate e2e & integration role_test to common
2022-05-10 10:17:16 -07:00
00d6d40aea
Merge pull request #13940 from lavacat/leases-list-test
...
tests/common/lease: don't use revision to wait for leases
2022-04-29 10:12:18 +02:00
67f3bb3ad4
tests/common/lease: don't use revision to wait for leases
...
Problem: TestLeaseGrantAndList is flaky because lists won't match at the end.
Test uses revision to verify that all members got leases. But checking for revision isn't enough.
Solution: use size of the list to stop polling.
2022-04-25 10:24:32 -07:00
842fed52c7
use lineariziable range request in TestKVGet
2022-04-18 08:56:19 +08:00
c4d055fe7b
Merge pull request #13819 from endocrimes/dani/auth_test.go
...
migrate e2e/users tests to common framework
2022-04-06 16:02:46 +02:00
f71196d113
tests/common/lease: Wait for correct lease list response
...
We don't consistently reach the same etcd server during the lifetime of
a test and in some cases, this means that this test will flake if an
etcd server was slow to update its state and the test hits the outdated
server.
Here we switch to using an `Eventually` case which will wait upto a
second for the expected result before failing - with a 10ms gap between
invocations.
```
[tests(dani/leasefix)] $ gotestsum -- ./common -tags integration -count 100 -timeout 15m -run TestLeaseGrantAndList
✓ common (2m26.71s)
DONE 1600 tests in 147.258s
```
2022-04-04 15:43:17 +02:00
ed1bc447c7
Flakes: Additional logging and timeouts to understand common flakes.
2022-04-03 14:48:36 +02:00
44aad460db
tests: Migrate noquorum kv tests to common framework
2022-03-21 14:53:29 +01:00
3416042c50
tests: migrate user tests to common fw
2022-03-21 12:46:00 +00:00
c6488a2c56
fix review
2022-03-20 10:09:27 +08:00
bb7856090a
fix: set cluster size to 1 to avoid unstable
2022-03-20 02:01:30 +08:00
527edd39a6
fix alarm test
2022-03-20 01:40:53 +08:00
02516ab266
Merge branch 'main' into tests/ctl-alarm
...
# Conflicts:
# tests/framework/e2e/etcdctl.go
# tests/framework/interface.go
2022-03-19 16:36:15 +08:00
e9fa171665
fix test fail
2022-03-19 16:31:19 +08:00
3e657bdc50
tests: Migrate key value Get to common framework
2022-03-19 00:51:29 +08:00
87740f6c7b
tests: Migrate TestCtlV3LeaseRevoke.* to common
2022-03-18 16:47:42 +00:00
36279e0797
tests: migrate TestCtlV3LeaseKeepAliveOnce.* to common
2022-03-18 16:47:42 +00:00
c12e03c8e6
tests: migrate TestCtlV3LeaseTestTimeToLiveExpired.* to common
2022-03-18 16:47:42 +00:00
b50f10299b
tests/framework: Add PutOptions
...
Put can take a leaseid to associate a value with a lease. This adds the
ability for tests to make use of this.
2022-03-18 16:47:42 +00:00
dca5874d44
tests: Migrate key value Get to common framework
2022-03-19 00:46:42 +08:00
b7beaf9c62
tests: migrate TestCtlV3LeaseGrantLeases.* to common
2022-03-18 16:43:55 +00:00
6b7be72a43
tests: migrate TestCtlV3LeaseGrantTimeToLive.* to common
2022-03-18 16:43:20 +00:00