Commit Graph

34 Commits

Author SHA1 Message Date
Ivan Valdes
31650ab0c8
server: Fix TestLogRotation error message in Go 1.24
The embedded structure is now also part of the log message. The failure
from the tests is the following:

--- FAIL: TestLogRotation (0.00s)
    --- FAIL: TestLogRotation/invalid_logger_config (0.00s)
        config_test.go:868: test "invalid logger config", expected
        error: invalid log rotation config: json: cannot unmarshal
               bool into Go struct field logRotationConfig.maxsize
               of type int,
        got: invalid log rotation config: json: cannot unmarshal
             bool into Go struct field logRotationConfig.Logger.maxsize
             of type int
FAIL

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-03-05 09:05:57 -08:00
Matthieu MOREL
a8d8c1887f chore: use usetesting instead of tenv
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-26 07:54:22 +01:00
Chun-Hung Tseng
5fa8c1f6b8 Migrate --experimental-set-member-localaddr to using feature flag
Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com>
2025-02-13 16:02:10 +00:00
Siyuan Zhang
2cd8fcce5d migrate experimental-enable-lease-checkpoint and experimental-enable-lease-checkpoint-persist flag to feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-02-06 14:31:00 -08:00
Marek Siarkowicz
d62cdeee48
Merge pull request #19254 from serathius/align-defaults
Align NewConfig with AddFlags defaults
2025-02-04 20:35:18 +01:00
Benjamin Wang
d4173b280d
Merge pull request #18971 from mmorel-35/testifier/server
fix: use testify instead of t.Fatal or t.Error in server package (part 1)
2025-02-03 14:54:11 +00:00
Marek Siarkowicz
93e90721a6 Align NewConfig with AddFlags defaults
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2025-01-30 09:38:14 +01:00
Marek Siarkowicz
6ddc4a2861 Add tests for NewConfig matching AddFlags defaults
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2025-01-21 17:39:51 +01:00
Matthieu MOREL
c3fb7954ee fix: use testify instead of t.Fatal or t.Error in server package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-01-14 08:12:46 +01:00
Ishan Tyagi
c73b3d1e8f migrate experimental-txn-mode-write-with-shared-buffer flag to feature gate.
Signed-off-by: ishan16696 <ishan.tyagi@sap.com>
2024-12-21 23:46:11 +05:30
Siyuan Zhang
85363bda32 migrate experimental-compact-hash-check-enabled to feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-12-17 09:44:53 -08: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
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
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
Lan Liang
a966c07165 migrate experimental-initial-corrupt-check flag to feature gate.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-08-22 14:42:18 +00:00
Siyuan Zhang
bd228cf6d1 migrate experimental-stop-grpc-service-on-defrag flag to feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-08-05 13:46:51 -07:00
Siyuan Zhang
0e77563e35 Add config file field for feature-gates flag.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-07-23 15:27:07 -07:00
lhy1024
acc9d7c9fe Support multiple values for allowed client and peer TLS identities
Signed-off-by: lhy1024 <admin@liudos.us>
2024-06-06 21:25:17 +08:00
Edwin Xie
4c77726914 Implement flag --experimental-set-member-localaddr
Which sets the LocalAddr to an IP address from --initial-advertise-peer-urls.

Also adds e2e test that requires this flag to succeed.

Co-authored-by: HighPon <s.shiraki.business@gmail.com>
Signed-off-by: Edwin Xie <edwin.xie@broadcom.com>
2024-05-24 18:17:37 +00:00
Seena Fallah
b31f23e113 config: support AllowedCN and AllowedHostname through config file
Allow setting AllowedCN and AllowedHostname tls fields through config file for peer transport security.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-07 22:39:16 +02: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
AngstyDuck
a7344da7d3 server: default value for config file field auto-compaction-mode is now 'periodic'; added additional checks if auto-compaction-mode is undefined
Signed-off-by: AngstyDuck <solsticedante@gmail.com>
2023-05-09 23:10:44 +08:00
Marek Siarkowicz
372042c374 refactor: Use proper variable names for urls
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-13 14:48:01 +01:00
Tero Saarni
588b98d085 Add TLSv1.3 support.
Added optional TLS min/max protocol version and command line switches to set
versions for the etcd server.

If max version is not explicitly set by the user, let Go select the max
version which is currently TLSv1.3. Previously max version was set to TLSv1.2.

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
2023-01-30 16:16:53 +02: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
Marek Siarkowicz
7d10899d7f server: Require either cluster version v3.6 or --experimental-enable-lease-checkpoint-persist to persist lease remainingTTL
To avoid inconsistant behavior during cluster upgrade we are feature
gating persistance behind cluster version. This should ensure that
all cluster members are upgraded to v3.6 before changing behavior.

To allow backporting this fix to v3.5 we are also introducing flag
--experimental-enable-lease-checkpoint-persist that will allow for
smooth upgrade in v3.5 clusters with this feature enabled.
2021-12-02 12:26:47 +01:00
Eng Zer Jun
2a151c8982
*: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
Mr-Mu
0e496ca212
TestLogRotation add log output relative path
TestLogRotation add test log output relative path test
2021-05-27 22:49:41 +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
Lili Cosic
7957f4461d server/embed/config_test.go: Add unit test for socket options 2021-05-20 10:00:27 +02:00
Sam Batschelet
82b2d5c67d server: add support for log rotation
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-07 08:39:51 -04:00
Piotr Tabor
3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
Brad Davidson
603d975599 Fix cluster peer HTTP SRV discovery
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-03 03:08:13 -08: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