282 Commits

Author SHA1 Message Date
Chun-Hung Tseng
133576899c
gofail: show error messages returned by gofail HTTP endpoints
Upon HTTP request error from fetchFailpointsBody, PUT and DELETE,
all of them will return an error message, which would be nice for
debugging if displayed.

Simplify `Enabled()` logic (linter suggestion)

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-04-28 05:49:24 +08:00
Marek Siarkowicz
0a8a95f803 Increase timeout for deactivating failpoint
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-04-05 10:29:21 +02:00
Ivan Valdes
8fb26a2c4e
tests/framework: remove (*Member) GRPCURL()
Currenly Member exports GrpcURL already as a struct variable. However,
when addressing the var-naming linting issues, renaming it from GrpcURL
to GRPCURL, clashes with the GRPCURL() function.

Given that it's already an exported variable, there's no need to define
a getter function. The use of this variable is also mixed, with calls to
both the exported variable (GrpcURL) and the function [GRPCURL()].

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-26 16:04:12 -07:00
Ivan Valdes
b7488d4355
tests/framework: address golangci var-naming issues
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-25 16:20:18 -07:00
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
Benjamin Wang
5a53a708d8
Merge pull request #17588 from ah8ad3/fix-flaky-jwt
flaky: fix jwt test with increasing ttl
2024-03-24 16:48:49 +00: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
ah8ad3
71f7db50e7 flaky: fix jwt test with increasing ttl
Signed-off-by: ah8ad3 <ah8ad3@gmail.com>
2024-03-16 11:34:02 +03:30
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
Marek Siarkowicz
40f22e9319
Merge pull request #17176 from YaoC/fix-learner-metric
server: fix learner metric incorrect issue
2024-01-12 17:37:46 +01:00
YaoC
f7ab7adf29 server: fix learner metric incorrect issue
Signed-off-by: YaoC <chengyao09@hotmail.com>
2024-01-12 09:36:33 +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
redwrasse
8a7596304a testutils: return early instead of first breaking in LogObserver.ExpectFunc
Signed-off-by: redwrasse <mail@redwrasse.io>
2023-12-12 22:24:00 -08:00
Benjamin Wang
f37a4365ee Support setting http client timeout when enable/disable failpoint
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-01 14:26:15 +00:00
Marek Siarkowicz
13d7bf5ab7 Increase client timeout for failpoint injection
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-11 11:53:41 +01:00
ZhouJianMS
827dc18682 Add IO stall failpoint in raft loop
Signed-off-by: ZhouJianMS <zhoujian@microsoft.com>
2023-11-03 16:42:33 +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
Marek Siarkowicz
c34ccfbc06 Dynamically generate flags passed to etcd binary
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 17:31:56 +02:00
Marek Siarkowicz
c71f60e797 Remove duplicated test
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 14:09:31 +02:00
Marek Siarkowicz
05cc60a539 Use contain to make tests clearer and more resilient to changes
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 14:09:31 +02:00
Marek Siarkowicz
6f63f4b676 Use single string to define a flag allowing for easier testing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 14:09:29 +02:00
Marek Siarkowicz
6d9a0a40b0 Add tests to prepare to dynamic flag generation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-11 23:31:39 +02:00
Marek Siarkowicz
f5e82260da Fix parsing failpoint names when failpoint has value set
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-07 18:20:18 +02:00
Marek Siarkowicz
05a77032fc Inject sleep during etcd bootstrap to reproduce https://github.com/etcd-io/etcd/issues/16666
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-07 12:31:56 +02:00
Marek Siarkowicz
c1fb2c2316 Use default embed config in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 14:17:45 +02:00
Marek Siarkowicz
e31de5e3c1 Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
This reverts commit 1713dc67b5149e74cd28bad7c080c646315d0b06.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-03 21:37:18 +02:00
Marek Siarkowicz
11b441b605 Reuse embed.Config in e2e cluster config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-01 09:56:31 +02:00
Benjamin Wang
628b45c099 test: add a test case to verify consistent memberlist on bootstrap
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:04:47 +01: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
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +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
9c3edfa0af *: fix staticcheck lint
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to #8901.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 11:24:26 +08:00
Wei Fu
df86cadd8b *: fix ineffassign lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 22:19:19 +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
chenyahui
c0aa3b613b Use any instead of interface{}
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +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
Benjamin Wang
7d95c68b48 test: support regular expression matching on the response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-25 15:00:35 +01:00
Wei Fu
e4e05c5713 tests/*: redirect metrics into file
Redirect metrics data into file to reduce output.

Fix: #16422

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-18 16:48:10 +08:00
Marek Siarkowicz
eb32d9cccc tests: Add support for lazyfs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-27 13:42:38 +02:00
Marek Siarkowicz
828e789c18 tests: Make EtcdServerProcess substruct of proxyEtcdProcess to dummy methods when extending EtcdProcess interface
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-27 10:04:02 +02: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
caojiamingalan
eff9517a90 etcdserver: add cluster id check for hashKVHandler
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-05 14:09:40 -05:00
Benjamin Wang
c6fd719ccf
Merge pull request #16029 from dusk125/revision-bump
Adding optional revision bump to snapshot restore
2023-07-03 07:01:53 +01:00
Allen Ray
be3e851264 Adding optional revision bump and mark compacted to snapshot restore
Signed-off-by: Allen Ray <alray@redhat.com>
2023-06-27 09:26:25 -04:00
Benjamin Wang
9f351b3ec6
Merge pull request #16127 from chaochn47/runtime-reconfig-tests
add runtime reconfiguration tests
2023-06-27 09:56:56 +01:00
Chao Chen
8e161b68f3 add runtime reconfiguration tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-26 09:09:39 -07:00
Wei Fu
b3316c0e09 *: should return exitCode even if cmd isn't nil
For the pkg/expect package, if the process has been stopped but there is
no `Close()` call, the `ExitCode()` won't return exit code correctly.
The `ExitCode()` should check `exitErr` and return exit code if cmd isn't nil.

And introduces `exitCode` to return correct exit code based on the
process is signaled or exited.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-25 10:39:34 +08:00