Commit Graph

30 Commits

Author SHA1 Message Date
Benjamin Wang
614640f1c2 format all prometheus metrics to ensure nice indent
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-29 13:42:14 +00:00
Matthieu MOREL
10d7cea552 chore: enable early-return and superfluous-else from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Co-authored-by: Iván Valdés Castillo <iv@nvald.es>
2025-01-18 09:44:58 +01:00
Chun-Hung Tseng
1430c1d8c1 dependency: bump github.com/jonboulle/clockwork from 0.4.0 to 0.5.0
Bumping this dependency also require fixing func newFakeClock() to
return a pointer to the struct (*clockwork.FakeClock)

Reference:
- https://github.com/etcd-io/etcd/pull/19131

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2025-01-12 21:20:16 +01:00
Matthieu MOREL
69efe31ea0 fix: enable gofumpt instead of gofmt linter in server
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-11-27 07:22:36 +01:00
Matthieu MOREL
5858a08f1b fix: enable require-error rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-31 08:33:34 +01:00
Benjamin Wang
6883308899
Merge pull request #18800 from mmorel-35/testifylint/require-error
fix: enable require-error rule from testifylint in client, pkg and server packages
2024-10-30 23:03:01 +00:00
Matthieu MOREL
3a3115122e fix: enable require-error rule from testifylint in client, pkg and server packages
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-28 21:02:58 +01:00
Matthieu MOREL
3abdf612b3 fix: enable errorlint in server directory
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-26 08:16:47 +02:00
Thomas Gosteli
ff4a8df3aa fix: enable formatter rule from testifylint
Signed-off-by: Thomas Gosteli <thomas.gosteli@protonmail.ch>
2024-10-17 14:10:35 +02:00
Matthieu MOREL
6165f60419 fix: enable expected-actual rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-17 09:17:59 +00:00
Matthieu MOREL
7ecb72a2b4 fix: enable error-nil rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-17 07:22:40 +02:00
Benjamin Wang
f0187c38d1
Merge pull request #18689 from mmorel-35/testifylint/nil-compare
fix: enable nil-compare rule from testifylint
2024-10-11 09:41:28 +01:00
Matthieu MOREL
de2c95dcba fix: enable nil-compare rule from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-11 07:10:03 +02:00
Matthieu MOREL
33d7f2d53e fix: enable gofmt and whitespace linters
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-11 07:03:18 +02:00
Matthieu MOREL
e06fb81713 fix: enable empty and len rules from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-10 11:07:21 +00:00
Matthieu MOREL
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
Ivan Valdes
c613b78e6c
etcdserver: address golangci var-naming issues
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-18 17:17:07 -07: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
chenyahui
c0aa3b613b Use any instead of interface{}
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +08:00
Benjamin Wang
dae1d70189 test: workaround the breaking change in jonboulle/clockwork
See
- https://github.com/jonboulle/clockwork/pull/55
- https://github.com/jonboulle/clockwork/blob/v0.3.0/clockwork.go#L42

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 12:01:09 +08:00
Piotr Tabor
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
Bhargav Ravuri
2feec4fe68 comments: fix comments as per goword in go test files
Comments fixed as per goword in go test files that shell
function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:05:42 +05:30
Sasha Melentyev
006e747a44 all: Change time unit
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 01:15:01 +03:00
Benjamin Wang
7f10dccbaf Bump go 1.19: update all the dependencies and go.sum files
1. run ./scripts/fix.sh;
2. cd tools/mod; gofmt -w . & go mod tidy;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Pavan BG
d9c5e1f0a2 *: Replace internal testutil AssertEqual function in favour of github.com/stretchr/testify/assert.Equals
To maintain uniformity in testing methodology, assert.Equals has been used everywhere while replacing testutil.AssertEqual

Fixes #13015
2021-05-20 19:55:45 +05:30
Piotr Tabor
3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
Piotr Tabor
0d9cfc11c8 Fix usage of reflect.SliceHeader: reported by vet on tip golang
Example:
https://travis-ci.com/github/etcd-io/etcd/jobs/470404938

```
% (cd server && go vet ./...)
stderr: # go.etcd.io/etcd/server/v3/etcdserver/api/v2store
stderr: etcdserver/api/v2store/node_extern_test.go:107:9: possible misuse of reflect.SliceHeader
stderr: etcdserver/api/v2store/node_extern_test.go:107:16: possible misuse of reflect.SliceHeader
```
2021-01-12 00:14:51 +01:00
Piotr Tabor
74274f4417 e2e: Adding better diagnostic and location for temporary files to Snapshot tests. 2021-01-12 00:14:51 +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
4a5e9d1261 server: Move server files to 'server' directory.
26  git mv mvcc wal auth etcdserver etcdmain proxy embed/ lease/ server
   36  git mv go.mod go.sum server
2020-10-26 12:57:19 +01:00