Marek Siarkowicz
49fbcd0d9b
Merge pull request #17584 from ivanvc/address-pkg-var-naming-lint-rule
...
pkg: address golangci var-naming issues
2024-03-24 18:49:22 +01:00
Ivan Valdes
14523bdc21
etcdserver: rename MemberId() to MemberID() to address var-naming
...
Signed-off-by: Ivan Valdes <ivan@vald.es >
2024-03-18 17:18:29 -07:00
Ivan Valdes
d98ff0d4ff
pkg: address golangci var-naming issues
...
Signed-off-by: Ivan Valdes <ivan@vald.es >
2024-03-14 21:17:37 -07:00
Benjamin Wang
5b2a9e2ab3
Remove the unused AuthTokenTTL parameter from integration test
...
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com >
2024-02-11 14:09:43 +00:00
Siyuan Zhang
b3a5307640
add tests to test tx delete consistency.
...
Signed-off-by: Siyuan Zhang <sizhang@google.com >
2024-01-10 09:33:13 -08:00
Chao Chen
913c8258f9
tests: add client failover on defrag test case in e2e
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2023-10-25 08:59:07 -07:00
Chao Chen
1324f03254
add existing http health check handler e2e test
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2023-10-18 12:42:23 -07:00
Wei Fu
aea1cd0077
feat: enable unparam lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2023-10-17 21:24:13 +08:00
Wei Fu
8870cb3070
*: fix unconvert linter
...
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2023-09-25 19:40:45 +08:00
Wei Fu
aa97484166
*: enable goimports in verify-lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2023-09-21 21:14:09 +08:00
Wei Fu
5e3910d96c
*: fix govet-shadow lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2023-09-19 20:24:01 +08:00
Yao Cheng
d2a93eb7ce
tests/integration: deflake TestV3AuthWithLeaseRevokeWithRootJWT
...
Signed-off-by: Yao Cheng <chengyao09@hotmail.com >
2023-09-02 06:31:54 +00:00
John Jiang
51a22c21ff
tests: cleanup unnecessary assignment in cluster.go
...
Signed-off-by: John Jiang <john.sha.jiang@gmail.com >
2023-07-19 21:58:33 +08:00
Chao Chen
6d79b86219
Enable failpoint by default in integration tests
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2023-06-21 23:13:46 -07:00
Chao Chen
e6c8bf82e0
add uds test cases into e2e TestAuthority
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2023-06-08 15:54:30 -07:00
Wei Fu
50aa00b203
tests: make log monitor as common helper
...
It's followup of #15667 .
This patch is to use zaptest/observer as base to provide a similar
function to pkg/expect.Expect.
The test env
```bash
11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
mkdir /sys/fs/cgroup/etcd-followup-15667
echo 0-2 | tee /sys/fs/cgroup/etcd-followup-15667/cpuset.cpus # three cores
```
Before change:
* memory.peak: ~ 681 MiB
* Elapsed (wall clock) time (h:mm:ss or m:ss): 6:14.04
After change:
* memory.peak: ~ 671 MiB
* Elapsed (wall clock) time (h:mm:ss or m:ss): 6:13.07
Based on the test result, I think it's safe to be enabled by default.
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2023-04-18 09:00:24 +08:00
Chao Chen
caed563e08
fix flaking auth member remove test
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2023-04-03 17:41:08 -07:00
Chao Chen
d7f992c351
enable pre-vote by default and add retry on member_test
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2023-03-17 15:15:13 -07:00
Benjamin Wang
1f0d361848
clientv3: support serializable MemberList operation
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-25 07:23:39 +08:00
Piotr Tabor
6f899a7b40
Merge pull request #15052 from ptabor/20221228-goimports-fix
...
./scripts/fix.sh: Takes care of goimports across the whole project.
2022-12-29 11:31:22 +01:00
Piotr Tabor
cf22f60e8b
Merge pull request #15053 from wafuwafu13/show-as-learner
...
enhancement(ctlv3): display `as learner` when member add as learner
2022-12-29 09:44:26 +01:00
Piotr Tabor
9e1abbab6e
Fix goimports in all existing files. Execution of ./scripts/fix.sh
...
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-29 09:41:31 +01:00
Wei Fu
4d0b91947e
chore: delete // +build buildtag by go fix
...
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2022-12-29 14:17:05 +08:00
wafuwafu13
0c67e318d7
enhancement(ctlv3): display as learner when member add as learner
...
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp >
2022-12-29 13:18:23 +09:00
Benjamin Wang
7ce21519fb
test: update test to use the new raft module go.etcd.io/raft/v3
...
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under directory test.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-02 13:32:47 +08:00
Sasha Melentyev
c3b6cbdb73
all: goimports -w .
...
Signed-off-by: Sasha Melentyev <sasha@melentyev.io >
2022-11-17 19:07:04 +03:00
Benjamin Wang
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
Chao Chen
f3c47d760c
update auth test interface
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2022-10-26 09:56:22 -04:00
Benjamin Wang
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
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
Thomas Jungblut
20dccfa484
Test port allocating using net.Listen
...
To avoid port clashes during integration tests, we let the OS give us a
free port.
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com >
2022-10-14 09:40:04 +02:00
Chao Chen
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
Benjamin Wang
159ed15afc
Merge pull request #14479 from demoManito/fix/declaring-empty-slice
...
etcd: modify declaring empty slices
2022-09-20 05:22:59 +08:00
Hitoshi Mitake
c793f18238
Merge pull request #14322 from mitake/watch-auth-err
...
*: handle auth invalid token and old revision errors in watch
2022-09-19 23:33:49 +09:00
Hitoshi Mitake
c5614520d5
tests: a test case for watch with auth token expiration
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com >
2022-09-17 21:51:36 +09:00
demoManito
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
Benjamin Wang
e8ad008067
integration_test: fix the flaky test TestV3AuthRestartMembe
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-09-14 14:30:37 +08:00
Clark
3beb25489d
tests: enable --strict-reconfig-check by default and expose it to common framework
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-08-31 22:21:23 +08:00
Clark
0b9f43410a
tests: e2e and integration share TickDuration constant
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-08-14 18:49:46 +08:00
Clark
a5409c62e6
tests: add WaitLeader function to common framework
...
Signed-off-by: Clark <fwyongxing@gmail.com >
2022-08-11 12:46:40 +08:00
Piotr Tabor
651de5a057
Rename EtcdServer.Id with EtcdServer.MemberId.
...
It was misleading and error prone vs. ClusterId.
2022-05-20 14:32:04 +02:00
Marek Siarkowicz
26f42e7a9e
server: Apply review comments and split basic handler
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
722ec487df
server: Split metrics and health code
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
600ee13ac0
server: Cover V3 health with tests
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
0096d2ecdb
server: Remove unused NewClientHandler
2022-05-05 09:52:13 +02:00
ahrtr
24002fb099
allocate unique port for each member in test cases
2022-04-26 12:32:00 +08:00
Piotr Tabor
d69e07dd3a
Verification framework and check whether cindex is not decreasing.
2022-04-22 12:32:05 +02:00
ahrtr
fe3a57976e
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-10 14:44:55 +08:00
Danielle Lancashire
7cc00ec981
tests/framework/integration: Fail nesting early
...
Currently there are a handful of tests within etcd that silently fail
because LeakDetection will skip the test before it manages to hit this
check.
Here we move the check to the beginning of the process to highlight
these cases earlier, and to avoid them accidentally presenting as leaks.
2022-04-07 13:10:15 +00:00
Piotr Tabor
68f2cb8c77
Fix ExampleAuth from integration/clientv3/examples (on OsX)
...
The code now ensures that each of the test is running in its own directory as opposed to shared os.tempdir.
```
$ (cd tests && env go test -timeout=15m --race go.etcd.io/etcd/tests/v3/integration/clientv3/examples -run ExampleAuth)
2022/04/03 10:24:59 Running tests (examples): ...
2022/04/03 10:24:59 the function can be called only in the test context. Was integration.BeforeTest() called ?
2022/04/03 10:24:59 2022-04-03T10:24:59.462+0200 INFO m0 LISTEN GRPC {"member": "m0", "grpcAddr": "localhost:m0", "m.Name": "m0"}
```
2022-04-03 14:16:45 +02:00