99f99cbb2f
fix: use testify instead of t.Fatal or t.Error in client package (part 1)
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-12-11 07:58:17 +01:00
18eb5c6881
Merge pull request #18748 from mmorel-35/golangci-lint/gofumpt
...
fix: enable gofumpt instead of gofmt linter in client
2024-10-25 12:25:33 +01:00
4c8a41cd24
fix: enable float-compare rule from testifylint
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-24 08:47:46 +02:00
867bd2689f
Merge pull request #18746 from mmorel-35/golangci-lint/thelper
...
fix: enable thelper linter in client directory
2024-10-23 07:57:03 +01:00
a7dcfdb839
Merge pull request #18741 from ghouscht/testifylint-formatter
...
fix: enable formatter rule from testifylint
2024-10-22 06:15:27 +01:00
906247c8f9
fix: enable gofumpt instead of gofmt linter in client
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-17 22:29:59 +02:00
ff4a8df3aa
fix: enable formatter rule from testifylint
...
Signed-off-by: Thomas Gosteli <thomas.gosteli@protonmail.ch >
2024-10-17 14:10:35 +02:00
97c8869184
fix: enable thelper linter in client directory
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-17 00:06:06 +02:00
b281a3c4fa
fix: enable errorlint in api, client and pkg
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-13 19:43:20 +02:00
33d7f2d53e
fix: enable gofmt and whitespace linters
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-11 07:03:18 +02:00
3343dc894a
fix: use require.NoError instead of t.Fatal(err) in client package
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-09 08:29:38 +02:00
b23947b604
fix: enable bool-compare rule from testifylint
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-06 09:47:02 +02:00
0857def30e
add backoff to client config
...
Signed-off-by: Allen Ray <alray@redhat.com >
2024-01-24 11:08:31 -05:00
aa97484166
*: enable goimports in verify-lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2023-09-21 21:14:09 +08:00
c023c06903
checks the client supported versions based on the current version
...
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com >
2023-07-27 19:42:02 -05:00
1f0d361848
clientv3: support serializable MemberList operation
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-25 07:23:39 +08:00
9abc895122
Goimports: Apply automated fixing to test files as well.
...
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-29 13:04:45 +01:00
2041d5f245
fix: change error message
...
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp >
2022-12-20 21:54:52 +09:00
57413851b6
fix(client): change error message
...
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp >
2022-12-20 21:52:59 +09:00
dc88d90763
test: add TestIsUnavailableErr
...
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp >
2022-12-20 21:52:59 +09:00
77e4e87ee7
refactor: use assert
...
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp >
2022-12-20 21:52:58 +09:00
95c520976a
client: Use func without format
...
Signed-off-by: Sasha Melentyev <sasha@melentyev.io >
2022-11-15 01:02:24 +03:00
8a587447d2
clientv3: fix errors init client RejectOldCluster
...
Signed-off-by: happlins <happlins@foxmail.com >
2022-10-13 17:24:24 +08:00
0887d9acf1
fix #14161
...
Signed-off-by: chavacava <salvadorcavadini+github@gmail.com >
2022-06-25 10:09:05 +00:00
0c9a4e0f93
Merge pull request #13837 from chrisayoub/main
...
clientv3: filter learner members during autosync
2022-04-09 19:00:55 -04:00
3b589fb3b2
Fix TestauthTokenBundleOnOverwrite on OsX:
...
```
% (cd client/v3 && env go test -short -timeout=3m --race ./...)
--- FAIL: TestAuthTokenBundleNoOverwrite (0.00s)
client_test.go:210: listen unix /var/folders/t1/3m8z9xz93t9c3vpt7zyzjm6w00374n/T/TestAuthTokenBundleNoOverwrite3197524989/001/etcd-auth-test:0: bind: invalid argument
FAIL
FAIL go.etcd.io/etcd/client/v3 4.270s
```
The reason was that the path exceeded 108 chars (that is too much for socket).
In the mitigation we first change chroot (working directory) to the tempDir... such the path is 'local'.
2022-04-02 16:12:02 +02:00
125f3c3f9a
clientv3: filter learners members during autosync
...
This change is to ensure that all members returned during the client's
AutoSync are started and are not learners, which are not valid
etcd members to make requests to.
2022-03-29 13:38:21 -04:00
7271adecc5
Merge pull request #12992 from awly/client-auth-bundle-overwrite
...
client/v3: do not overwrite authTokenBundle on dial
2021-07-01 10:40:18 +02:00
ab8e5a4f8e
client/v3: do not overwrite authTokenBundle on dial
...
`Client.dial` can be called multiple times. For example, from regular
`NewClient` and [from the `Maintenance`
wrapper](6d451ab61d/client/v3/maintenance.go (L81-L84)
).
This ends up creating two (if `Client.dial` is called twice) independent
`credentials.Bundle` instances:
- the first one is wired into `PerRPCCredentials` callback in gRPC
client.
- the second one is in `Client.authTokenBundle` and receives the latest
auth token updates.
When using username/password authentication and the server is configured
to issue JWTs, token rotation logic breaks because of the above
`credentials.Bundle` confusion.
2021-06-23 09:44:27 -07:00
f15e0b8237
integration.BeforeTest can be run without leak-detection.
2021-05-27 20:55:11 +02:00
3dd577ec08
Simplify client's logger configuration in tests.
2021-05-18 13:03:16 +02:00
1189ee3f3d
client: Add logger argument to NewCtxClient
2021-05-12 16:40:55 +02:00
06afe87b34
client: Allow setting zap logger in config
2021-05-12 12:15:20 +02:00
ffea1537d4
ClientV3 tests use integration.NewClient that configures proper logger.
2021-04-29 18:18:34 +02:00
3bb7acc8cf
Migrate dependencies pkg/foo -> client/pkg/foo
2021-04-07 00:38:47 +02:00
a47c18d30a
Fix 2 remaining 'defer AfterTest' calls.
2021-03-13 23:41:29 +01:00
2c2456bf3d
*: partial staticcheck fix
2021-03-10 14:13:38 +00:00
fb1d48e98e
Integration tests: Use BeforeTest(t) instead of defer AfterTest().
...
Thanks to this change, a single method BeforeTest(t) can handle
before-test logic as well as registration of cleanup code
(t.Cleanup(func)).
2021-03-09 18:19:51 +01:00
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
8a7f15511c
clientv3: Move to client/v3 (just file move)
...
Mechanical:
% git mv clientv3 client/v3
% git mv client/mock client/v3/
2020-10-20 10:08:35 +02:00