Commit Graph

1121 Commits (dependabot/go_modules/go.uber.org/atomic-1.10.0)

Author SHA1 Message Date
Wei Fu e58c73cc18 maintenance: add test to verify content of Snapshot
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-16 15:53:39 +08:00
Wei Fu a438794abb e2e: deflake TestCtlV3AuthGracefulDisable
We should call Wait for grpc-proxy process stop before start. Otherwise,
the tcp port won't be released.

Fixes: #14926

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-16 13:33:02 +08:00
Chao Chen 008df94901 tests/common: migrate auth tests #1
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-12-15 10:49:20 -08:00
Benjamin Wang 6e42da26e4
Merge pull request #14981 from etcd-io/dependabot/go_modules/tests/github.com/anishathalye/porcupine-0.1.4
build(deps): bump github.com/anishathalye/porcupine from 0.1.2 to 0.1.4 in /tests
2022-12-14 08:46:34 +08:00
dependabot[bot] c5d80b388b
build(deps): bump github.com/anishathalye/porcupine in /tests
Bumps [github.com/anishathalye/porcupine](https://github.com/anishathalye/porcupine) from 0.1.2 to 0.1.4.
- [Release notes](https://github.com/anishathalye/porcupine/releases)
- [Commits](https://github.com/anishathalye/porcupine/compare/v0.1.2...v0.1.4)

---
updated-dependencies:
- dependency-name: github.com/anishathalye/porcupine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 22:32:23 +00:00
Benjamin Wang c4f7ac28a2 deps: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.32.0 to 0.37.0 in /server
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:32:18 +08:00
Benjamin Wang 32840bae73 deps: bump go.opentelemetry.io/otel from 1.7.0 to 1.11.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:27:04 +08:00
Benjamin Wang 8f320bfa00 deps: bump github.com/golang-jwt/jwt/v4 from 4.4.2 to 4.4.3 in /server
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:19:10 +08:00
Benjamin Wang b96be4f1d3 deps: bump github.com/cheggaaa/pb/v3 from 3.0.8 to 3.1.0 in /etcdctl
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:03:53 +08:00
Benjamin Wang 2c192f4205 deps: bump go.uber.org/multierr from 1.8.0 to 1.9.0 in /server
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:00:49 +08:00
Benjamin Wang 700ad0fdce deps: bump github.com/creack/pty from 1.1.11 to 1.1.18 in /pkg
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:46:14 +08:00
Benjamin Wang c2a7a5870d deps: bump github.com/prometheus/client_golang from 1.12.2 to 1.14.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:42:11 +08:00
Benjamin Wang bc41c0963b deps: bump github.com/coreos/go-systemd/v22 from 22.3.2 to 22.5.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:38:55 +08:00
Benjamin Wang 259a73d67a deps: bump github.com/spf13/cobra from 1.4.0 to 1.6.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:33:24 +08:00
Benjamin Wang 1a0af6fee6 deps: bump go.uber.org/zap from 1.21.0 to 1.24.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:33:24 +08:00
Benjamin Wang 3c51c42417 test: fix nil pointer panic in testMutexLock
Refer to: https://github.com/etcd-io/etcd/actions/runs/3671847902/jobs/6207463700

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xedc388]

goroutine 5253 [running]:
go.etcd.io/etcd/client/v3/concurrency.(*Session).Client(...)
	/home/runner/work/etcd/etcd/client/v3/concurrency/session.go:76
go.etcd.io/etcd/client/v3/concurrency.(*Mutex).tryAcquire(0xc000133140, {0x18a8668, 0xc000050158})
	/home/runner/work/etcd/etcd/client/v3/concurrency/mutex.go:111 +0x88
go.etcd.io/etcd/client/v3/concurrency.(*Mutex).Lock(0xc000133140, {0x18a8668, 0xc000050158})
	/home/runner/work/etcd/etcd/client/v3/concurrency/mutex.go:74 +0x68
go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes_test.testMutexLock.func1()
	/home/runner/work/etcd/etcd/tests/integration/clientv3/experimental/recipes/v3_lock_test.go:65 +0x285
created by go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes_test.testMutexLock
	/home/runner/work/etcd/etcd/tests/integration/clientv3/experimental/recipes/v3_lock_test.go:59 +0xda
FAIL	go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes	7.070s
FAIL
```

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-12 10:18:45 +08:00
Marek Siarkowicz 1bb4c9558d tests: Update gofail to v0.1.0
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-10 14:49:20 +01:00
Benjamin Wang 893a3e7356
Merge pull request #14916 from ahrtr/bump_go_1.19.4
Bump go to 1.19.4 and golang.org/x/net to v0.4.0 to address CVEs
2022-12-09 16:38:39 +08:00
Benjamin Wang 1ba246e1d8 bump golang.org/x/ to v0.4.0
Found 1 known vulnerability.

Vulnerability #1: GO-2022-1144
  An attacker can cause excessive memory growth in a Go server
  accepting HTTP/2 requests. HTTP/2 server connections contain a
  cache of HTTP header keys sent by the client. While the total
  number of entries in this cache is capped, an attacker sending
  very large keys can cause the server to allocate approximately
  64 MiB per open connection.

  Call stacks in your code:
Error:       tools/etcd-dump-metrics/main.go:158:5: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls golang.org/x/net/http2.Server.ServeConn

  Found in: golang.org/x/net/http2@v0.2.0
  Fixed in: golang.org/x/net/http2@v0.4.0
  More info: https://pkg.go.dev/vuln/GO-2022-1144
Error: Process completed with exit code 3.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-09 08:54:48 +08:00
Benjamin Wang dccc21bb69 bump go 1.19.4
$ govulncheck ./...
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.

Scanning for dependencies with known vulnerabilities...
Found 1 known vulnerability.

Vulnerability #1: GO-2022-1144
  An attacker can cause excessive memory growth in a Go server
  accepting HTTP/2 requests. HTTP/2 server connections contain a
  cache of HTTP header keys sent by the client. While the total
  number of entries in this cache is capped, an attacker sending
  very large keys can cause the server to allocate approximately
  64 MiB per open connection.

  Call stacks in your code:
      tools/etcd-dump-metrics/main.go:159:31: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main$4 calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls golang.org/x/net/http2.ConfigureServer$1

  Found in: golang.org/x/net/http2@v0.2.0
  Fixed in: golang.org/x/net/http2@v1.19.4
  More info: https://pkg.go.dev/vuln/GO-2022-1144

Vulnerability #2: GO-2022-1144
  An attacker can cause excessive memory growth in a Go server
  accepting HTTP/2 requests. HTTP/2 server connections contain a
  cache of HTTP header keys sent by the client. While the total
  number of entries in this cache is capped, an attacker sending
  very large keys can cause the server to allocate approximately
  64 MiB per open connection.

  Call stacks in your code:
      contrib/lock/storage/storage.go:106:28: go.etcd.io/etcd/v3/contrib/lock/storage.main calls net/http.ListenAndServe
      contrib/raftexample/httpapi.go:113:31: go.etcd.io/etcd/v3/contrib/raftexample.serveHTTPKVAPI$1 calls net/http.Server.ListenAndServe
      tools/etcd-dump-metrics/main.go:159:31: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main$4 calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls net/http.Serve
      tools/etcd-dump-metrics/main.go:159:31: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main$4 calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls net/http.Server.Serve

  Found in: net/http@go1.19.3
  Fixed in: net/http@go1.19.4
  More info: https://pkg.go.dev/vuln/GO-2022-1144

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-09 07:39:57 +08:00
Marek Siarkowicz 26bf2f81f5 tests: Add Txn operation to linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-08 23:57:42 +01:00
Marek Siarkowicz 60200b37d3 tests: Refactor etcd model
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-08 10:01:43 +01:00
Marek Siarkowicz 5ff9202027 tests: Refactor append failed requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:21:07 +01:00
Marek Siarkowicz 619ca4f5cf tests: Add comments explaning handling failed requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz d8da98c49f tests: Fix return time for failed requests globally
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz 45fdc2bbac tests: Extract history from client
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz c5c2ea6aad tests: Enforce that revision doesn't skips without error
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz fe6e42d411 tests: Improve tests by expending on scenarios
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz 1d31e5e958 tests: Consider only latest failed request
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz b922afc0a3 tests: Make etcdRequest and etcdResponse public to make it serializable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz 68fd863c87 tests: Mark failed requests as timed out
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz 6a68141db5 tests: Allow dynamic number of clients
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
Marek Siarkowicz 42bb543315
Merge pull request #14897 from serathius/linearizability-trigger-exit
Allow failpoint requests to fail assuming that process exists within 1 second
2022-12-06 09:31:21 +01:00
Marek Siarkowicz 2263315871
Merge pull request #14802 from geetasg/delete_api
linearizability tests - Add support for delete api
2022-12-06 09:30:59 +01:00
Marek Siarkowicz f2bc0823f6 tests: Make it explicit that we only suppurt panic failpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 09:08:36 +01:00
Marek Siarkowicz 738ee3687a tests: Allow failpoint requests to fail assuming that process exists within 1 second
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 09:08:36 +01:00
Marek Siarkowicz a5cfc089fa tests: Refactor picking a member function
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 09:08:36 +01:00
Marek Siarkowicz 5baf8377bb
Merge pull request #14885 from serathius/linearizability-recreate-cluster
Linearizability recreate cluster
2022-12-05 12:16:00 +01:00
Piotr Tabor 40cc73c22e
Merge pull request #14889 from halegreen/fix-typo
test: fix typo
2022-12-04 16:33:35 +01:00
WangXiaoxiao f7f5474515 test:fix typo
Signed-off-by: WangXiaoxiao <1141195807@qq.com>
2022-12-04 21:11:12 +08:00
Marek Siarkowicz a573d8af69 tests: Use golang count to repeat tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
Marek Siarkowicz 7f70b8cf76 tests: Separate retries count from failure trigger count
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
Marek Siarkowicz df2d075e1a tests: Sleep between failpoint failure
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
Marek Siarkowicz 11711fc007 tests: Recreate cluster for every failpoint trigger
This shortens operation history and avoids having to many failed requests.
Failed requests are problematic as too many of them can cause linearizability
verification complexity to become exponential.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
Benjamin Wang 5503a9484a test: cleanup go.mod and go.sum files
Executed commands below,
1. Removed go.etcd.io/raft/v3 => ../raft;
2. go get go.etcd.io/raft/v3@eaa6808e1f7ab2247c13778250f70520b0527ff1;
3. go mod tidy

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:36:05 +08: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
Marek Siarkowicz ccf5d3c1af Cleanup comment
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-01 09:49:33 -08:00
Marek Siarkowicz eef1fb9246 Record delete request errors
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-01 09:49:22 -08:00
Geeta Gharpure 6be22d84ef Updated as per review feedback.
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2022-12-01 09:39:26 -08:00
Geeta Gharpure de991a9f2d linearizability tests - Add support for delete api
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2022-12-01 09:39:26 -08:00
Benjamin Wang 3f86db5e53 bump golang.org/x imports to address CVEs
Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32149

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-30 05:03:43 +08:00
Benjamin Wang 7b19ee6396 test: add integration test to cover the multiple member corruption case
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang a3197102e9 test: rollback the change in PR pull/14824
The change did in https://github.com/etcd-io/etcd/pull/14824 fixed
the test instead of the product code. It isn't correct. After we
fixed the product code in this PR, we can revert the change in
that PR.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang 285e44378f bump github.com/stretchr/testify from v1.7.2 to v1.8.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 10:51:32 +08:00
Benjamin Wang cd15507c65 test: enhance case TestEndpointHashKV to check both hash and hashRevision
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
Marek Siarkowicz f18ac02e0f
Merge pull request #14834 from fuweid/bump-grpc-1.51
bump grpc to v1.51.0 from v1.47.0
2022-11-24 09:07:56 +01:00
Bhargav Ravuri dbfe42bbd2 comments: fix comments as per goword in go _test pkg files
Comments fixed as per goword in go _test package 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-24 00:03:00 +05:30
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
Wei Fu cf285ea3c7 bump grpc to v1.51.0 from v1.47.0
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-23 22:16:22 +08:00
Marek Siarkowicz 51c0b4dff3
Merge pull request #14825 from clarkfw/EtcdProcessClusterConfig-antipattern-name
tests: fix anti-pattern name in `NewEtcdProcessCluster`
2022-11-23 15:11:36 +01:00
Andrew Sims f656fa0f49 add missing copyright headers
Signed-off-by: Andrew Sims <andrew.cameron.sims@gmail.com>
2022-11-23 19:13:43 +11:00
Clark b298c85a34 tests: fix anti-pattern name in `NewEtcdProcessCluster`
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-23 00:32:10 +08:00
Wei Fu 0b30e83b1d tests/integration: deflake Corruption cases
If the corrupted member has been elected as leader, the memberID in alert
response won't be the corrupted one. It will be a smaller follower ID since
the raftCluster.Members always sorts by ID. We should check the leader
ID and decide to use which memberID.

Fixes: #14823

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-22 22:19:55 +08:00
Dirkjan Bussink c26dabacbd
release: build with consistent paths
This changes the builds to always add -trimpath which removes specific
build time paths from the binary (like current directories etc).

Improves build reproducability to make the final binary independent from
the specific build path.

Lastly, when stripping debug symbols, also add -w to strip DWARF symbols
as well which aren't needed in that case either.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-11-21 15:06:11 +01:00
Benjamin Wang ebfcaaed34 test: fix the test failures in e2e/warning_logging_test.go
1. Fixed the test failures which are caused by recent test framework rafactoring;
2. renamed the file to promote_experimental_flag_test.go.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-19 01:51:06 +08:00
Bogdan Kanivets 7e8ebf7727 server: added duplicate warning-unary-request-duration flag
--warning-unary-request-duration is a duplicate of --experimental-warning-unary-request-duration
experimental-warning-unary-request-duration will be removed in v3.7.

fixes https://github.com/etcd-io/etcd/issues/13783

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-11-18 18:06:00 +08:00
Benjamin Wang 6d8139dcea
Merge pull request #14788 from sashamelentyev/imports
all: goimports -w .
2022-11-18 09:03:43 +08:00
Benjamin Wang 2742bdc32a
Merge pull request #14752 from serathius/linearizability-raftBeforeLeaderSend
Linearizability raft before leader send
2022-11-18 08:56:11 +08:00
Sasha Melentyev c3b6cbdb73 all: goimports -w .
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-17 19:07:04 +03:00
Marek Siarkowicz 9b3bfcdfeb
Merge pull request #14798 from tjungblu/fix_locking_tests
Fix TestCtlV3Lock/Elect flakes
2022-11-17 15:40:47 +01:00
Marek Siarkowicz 371179e292 tests: Trigger raftBeforeLeaderSend
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-17 14:17:16 +01:00
Thomas Jungblut eebfd15983 Fix TestCtlV3Lock/Elect flakes
waiting for a proper exit after a signal should ensure the goroutines
don't leak.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-17 10:59:22 +01:00
Marek Siarkowicz bf3eea8831 tests: Allow creating client for EtcdProcess
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-17 10:48:14 +01:00
Benjamin Wang 0c1901466f test: add test case to cover the CommonName based authentication
Refer to https://github.com/etcd-io/etcd/issues/14764

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-16 18:34:34 +08:00
Benjamin Wang 585054e448 test: add certificate with root CommonName
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-16 18:31:53 +08:00
Clark 7180267d56 tests: refactor `EtcdProcessClusterConfig` with Functional Options Pattern
remove `cfg *EtcdProcessClusterConfig` param from `NewEtcdProcessCluster` function

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-16 15:05:29 +08:00
Clark 9406de0033 tests: refactor `EtcdProcessClusterConfig` with Functional Options Pattern
replace all initialisations with `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-16 15:05:28 +08:00
Benjamin Wang 8438ddae3e
Merge pull request #14767 from sashamelentyev/print
all: Change Printf and friends to Print if there is no formatting
2022-11-16 10:38:20 +08:00
Sasha Melentyev 2c9c209eb6 all: Changing Printf and friends to Print if there is no formatting
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 22:11:23 +03:00
Marek Siarkowicz 8ae4420c4c tests: Add compact failpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-15 15:00:18 +01:00
Benjamin Wang 39ca876f38
Merge pull request #14757 from ahrtr/add_failpoint_20221115
etcdserver: add failpoints for backend
2022-11-15 17:14:14 +08:00
Benjamin Wang cf190fb5b0 test: apply backend failpoints into the linearizablity test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-15 16:36:56 +08:00
Marek Siarkowicz f8162919f9
Merge pull request #14744 from clarkfw/functional-options-pattern-EtcdProcessClusterConfig-2-1
tests: refactor `EtcdProcessClusterConfig` using Functional Options Pattern
2022-11-15 09:27:24 +01:00
Benjamin Wang f49d96f8b7
Merge pull request #14756 from sashamelentyev/time
all: Change time unit
2022-11-15 15:54:30 +08:00
Benjamin Wang d62e018495
Merge pull request #14755 from serathius/linearizability-traffic
tests: Make linearizability traffic extendable
2022-11-15 09:11:40 +08:00
Sasha Melentyev 006e747a44 all: Change time unit
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 01:15:01 +03:00
Marek Siarkowicz 2fc1485f29 tests: Make linearizability traffic extendable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-14 23:14:10 +01:00
Sasha Melentyev 855aa4f7a7 all: Use ReplaceAll instead of Replace with -1 pos
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 00:06:09 +03:00
Marek Siarkowicz ca8baeb308
Merge pull request #14685 from serathius/linearizability-revision
Revision inconsistency caused by panic during defrag
2022-11-14 12:49:22 +01:00
Marek Siarkowicz 77cd6a660f
Merge pull request #14742 from fuweid/deflake-issue-14694
tests/e2e: disable testShellCompletion if enable cov flag
2022-11-14 12:41:40 +01:00
Marek Siarkowicz ff6c93f630 tests: Add revision to etcd linearizability model
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-14 12:20:55 +01:00
Thomas Jungblut 5b163aa507 Expect exit code enhancement
ExpectProcess and ExpectFunc now take the exit code of the process into
account, not just the matching of the tty output.

This also refactors the many tests that were previously succeeding on
matching an output from a failing cmd execution.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-14 11:19:41 +01:00
Wei Fu c2f27a0070 tests/e2e: disable testShellCompletion if enable cov flag
The etcdctl and etcdutl built with `-tags cov` mode will show go-test result
after each execution, like

```
...

PASS
coverage: 0.0% of statements in ./...
```

Since the PASS is not real command, the `source completion` command will
fail with command-not-found error. And there is no easy way to disable
the (*testing.M).Run's output. Therefore, this patch uses build tag !cov
to disable cases when enable coverage.

Fixes: #14694

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-14 17:58:18 +08:00
Benjamin Wang 2532ca84d1 test: add failpoints into linearizablity test for commitBeforePreCommitHook and commitAfterPreCommitHook
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-14 11:11:48 +08:00
Clark 3510680c32 tests: refactor `EtcdProcessClusterConfig` using Functional Options Pattern
replace some initialisations with `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-14 03:07:51 +08:00
Marek Siarkowicz d5a6d2518d tests: Optimize checking failed writes
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-13 13:36:21 +01:00
Clark caaeee2920 tests: refactor `EtcdProcessClusterConfig` with Functional Options Pattern
replace some initialisations with `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-13 00:27:41 +08:00
Benjamin Wang dbc7204610 test: Create a subdirectory for each member when DataDirPath is specified
When e2e test cases specify the DataDirPath and there are more than
one member in the cluster, we need to create a subdirectory for each
member. Otherwise all members share the same directory and accordingly
lead to conflict.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-11 18:48:42 +08:00
Marek Siarkowicz 2f558ca0db
Merge pull request #14714 from serathius/linearizability-data-dir
tests: Preserve data dir from failed linearizability tests
2022-11-10 13:58:23 +01:00
Marek Siarkowicz 04caec5960 tests: Preserve data dir from failed linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-10 11:05:59 +01:00
Benjamin Wang 0bff3ade4d
Merge pull request #14704 from chenyahui/mutex_unlock_state
etcdclient: check mutex state in Unlock method of concurrency.Mutex
2022-11-10 10:38:03 +08:00
Marek Siarkowicz 0d4a516d11
Merge pull request #14710 from tjungblu/downgrade_binary
Take binary version in Downgrade/Upgrade Test
2022-11-09 13:44:15 +01:00
Thomas Jungblut 0daf153b4f Take binary version in Downgrade/Upgrade Test
This fix avoids the assumption of knowing the current version of the
binary. We can query the binary with the version flag to get the actual
version of the given binary we upgrade and downgrade to. The
respectively reported versions should match what is returned by the
version endpoint.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-09 10:41:07 +01:00
Benjamin Wang b32cd938b3 test: add mix versions sending snapshot test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-09 16:04:22 +08:00
Benjamin Wang 080effc935 test: enhance StartNewProc to accept one more parameter: EtcdProcessClusterConfig
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-09 16:04:22 +08:00
Clark 269a0beb41 tests: refactor `EtcdProcessClusterConfig` with Functional Options Pattern
add `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-09 03:37:42 +08:00
chenyahui 5b8c6b548f etcdclient: check mutex state in Unlock method of concurrency.Mutex
Check the values of myKey and myRev first in Unlock method to prevent calling Unlock without Lock. Because this may cause the value of pfx to be deleted by mistake.

Signed-off-by: chenyahui <cyhone@qq.com>
2022-11-08 22:24:52 +08:00
Marek Siarkowicz 554b1bd0b0
Merge pull request #14687 from serathius/random-failpoint
tests: Add triggering random go failpoints to linearizability tests
2022-11-07 20:59:39 +01:00
Benjamin Wang 757cf33c00 test: update e2e test cases to use e2e specfic configuration from e2e package
Afer moving `ClusterVersion` and related constants into e2e packages,
some e2e test cases are broken, so we need to update them to use the
correct definitions.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-07 10:25:04 +08:00
Benjamin Wang 86e71f026e test: update the definition of testRunner and clusterTestCases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-07 10:18:51 +08:00
Benjamin Wang fc23d0e83a test: add ClusterContext into the common ClusterConfig
ClusterContext is used by "e2e" or "integration" to extend the
ClusterConfig. The common test cases shouldn't care about what
data is encoded or included; instead "e2e" or "integration"
framework should decode or parse it separately.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-07 10:05:45 +08:00
Marek Siarkowicz 71b40b3abf tests: Extend common test to run previous release
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-07 06:51:59 +08:00
Marek Siarkowicz 219278b298 tests: Add triggering random go failpoints to linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-06 15:56:28 +01:00
Benjamin Wang c00ede393f test: fix pipeline errors due to PRs conflict
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-06 06:28:51 +08:00
Hitoshi Mitake 49db50c117
Merge pull request #14663 from ahrtr/auth_20221031
auth: check permission when performing maintainenence operations if auth is enabled
2022-11-05 23:13:29 +09:00
Benjamin Wang d71762f4f0
Merge pull request #14683 from ahrtr/test_framework_20221104
test: refactor the framework structure to make it clearer
2022-11-05 04:30:59 +08: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
Marek Siarkowicz e614eec948
Merge pull request #14560 from serathius/env
tests: Pass only etcd related environment variables during e2e tests
2022-11-04 11:24:07 +01:00
Benjamin Wang f782891246 test: added auth test on maintenance API
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:39:42 +08:00
Benjamin Wang 1791ab5754 test: add common functions for auth test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:39:42 +08:00
Wei Fu 3ddcb3ddef test: deflake TestDowngradeUpgradeClusterOf3 timeout
In the TestDowngradeUpgradeCluster case, the brand-new cluster is using
simple-config-changer, which means that entries has been committed
before leader election and these entries will be applied when etcdserver
starts to receive apply-requests. The simple-config-changer will mark
the `confState` dirty and the storage backend precommit hook will update
the `confState`.

For the new cluster, the storage version is nil at the beginning. And
it will be v3.5 if the `confState` record has been committed. And it
will be >v3.5 if the `storageVersion` record has been committed.

When the new cluster is ready, the leader will set init cluster version
with v3.6.x. And then it will trigger the `monitorStorageVersion` to
update the `storageVersion` to v3.6.x. If the `confState` record has
been updated before cluster version update, we will get storageVersion
record.

If the storage backend doesn't commit in time, the
`monitorStorageVersion` won't update the version because of `cannot
detect storage schema version: missing confstate information`.

And then we file the downgrade request before next round of
`monitorStorageVersion`(per 4 second), the cluster version will be
v3.5.0 which is equal to the `UnsafeDetectSchemaVersion`'s result.
And we won't see that `The server is ready to downgrade`.

It is easy to reproduce the issue if you use cpuset or taskset to limit
in two cpus.

So, we should wait for the new cluster's storage ready before downgrade
request.

Fixes: #14540

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-02 22:50:31 +08:00
Benjamin Wang 94e0c2410b bump go version to 1.19.3 to address security fixes
FYI. https://groups.google.com/g/golang-announce/c/dRtDK7WS78g

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-02 09:07:22 +08:00
spacewander e73a25a1d0 ci: ensure the generated code is up-to-date
See https://github.com/etcd-io/etcd/pull/14612#issue-1419792069
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-10-31 19:58:21 +08:00
Benjamin Wang 5073af6521
Merge pull request #14660 from clarkfw/new-cluster-accept-configuration-as-options
tests: TestRunner.NewCluster accepts options
2022-10-31 19:15:23 +08:00
Clark fa9ee5cce9 tests: TestRunner.NewCluster accepts options
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-10-31 15:26:08 +08:00
Benjamin Wang a1018dbddf
Merge pull request #14604 from ahrtr/double_barrier
clientv3: fix the implementation of double barrier
2022-10-31 08:13:12 +08:00
Benjamin Wang d1f7136a50
Merge pull request #14621 from ahrtr/functional_test_20221025
test: terminate functional test on failure and code cleanup
2022-10-31 07:42:29 +08:00
vivekpatani 680310a6c9 *: bump to go1.19.2 from 1.19.1
- update .github workflows
- update tests

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2022-10-27 18:45:02 -07:00
Oleg Guba fbed8cb645 etcdserver: call refreshRangePermCache on Recover() in AuthStore
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-27 15:05:05 -07:00
Oleg Guba b22e3ff4eb Allow passing client options to Client()
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-27 14:08:23 -07:00
Marek Siarkowicz c45f3388ac
Merge pull request #14632 from clarkfw/functional-options-pattern-of-cluster-config
tests: add a ClusterOption interface for ClusterSize in config.Cluster
2022-10-27 16:29:57 +02:00
Oleg Guba 47c558e605 [e2e] don't pass --endpoints flag in test HashKV implementation
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-27 02:02:58 -07:00
Clark e28b66f751 tests: add a ClusterOption interface for ClusterSize in config.ClusterConfig
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-10-26 23:41:09 +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 5550041633
Merge pull request #14629 from clarkfw/fix-anti-pattern-naming
test: fix anti-pattern naming problem in config.ClusterConfig
2022-10-26 20:01:43 +08:00
Clark 08284c56e0 test: fix anti-pattern naming problem in config.ClusterConfig
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-10-26 15:47:19 +08:00
Benjamin Wang 42cfb74b4c test: define a default WithAuth to resolve error Unresolved reference 'WithAuth' from IDE
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-26 14:30:47 +08:00
Marek Siarkowicz 8ce81a1624
Merge pull request #14611 from serathius/issue14370
tests: Add linearizability tests scenario for #14370
2022-10-25 14:03:39 +02:00
Benjamin Wang 36cbd6aff3 test: terminate functional test on failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-25 17:15:11 +08:00
Benjamin Wang 3ee2f5711e test: add common function "WithAuth"
We defines two common `WithAuth` functions for e2e and integration
test respectively. They are calling `integration.WithAuth` and
`e2e.WithAuth` respectively.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-25 02:41:49 +08:00
Marek Siarkowicz 837819860b tests: Add linearizability tests scenario for #14370
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-24 13:36:12 +02: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 e5790d204c
Merge pull request #14398 from serathius/linearizability
Validate etcd linearizability
2022-10-23 12:09:30 +02:00
Marek Siarkowicz 069e26e284 tests: Validate etcd linearizability
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-23 06:41:38 +02:00
Benjamin Wang 61c8888440
Merge pull request #14602 from ahrtr/enhance_functional_test_20221020
functional_test: code cleanup and minor enhancements
2022-10-23 11:00:25 +08:00
Benjamin Wang 3b4c255444
Merge pull request #14608 from veshij/auth
[e2e] Fix AuthEnable/Disable e2e test implementations
2022-10-22 08:19:05 +08:00
Oleg Guba 44bc007494 Update tests/framework/e2e/etcdctl.go
address comment

Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-21 10:44:09 -07:00
Oleg Guba 24831a0242 Update tests/framework/e2e/etcdctl.go
address comment

Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-21 10:44:09 -07:00
Oleg Guba a39374f33a [e2e] Fix AuthEnable/Disable e2e test implementations
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-20 19:15:31 -04:00
Benjamin Wang b5751636e3
Merge pull request #14607 from veshij/hashkv
[e2e] Fix bug in EtcdctlV3.HashKV() e2e implementation.
2022-10-21 06:02:01 +08:00
Oleg Guba a466d5cc2e [e2e] Fix bug in EtcdctlV3.HashKV()
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-20 17:37:16 -04:00
Benjamin Wang 62167d1f1f clientv3: fix the design & implementation of double barrier
Check the client count before creating the ephemeral key, do not
create the key if there are already too many clients. Check the
count after creating the key again, if the total kvs is bigger
than the expected count, then check the rev of the current key,
and take action accordingly based on its rev. If its rev is in
the first ${count}, then it's valid client, otherwise, it should
fail.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-20 16:24:20 +08:00
Benjamin Wang bbda1daecf functional_test: code cleanup and minor enhancements
Cleaned up some useless or dead code;
Remove some unnecessary methods.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-20 10:35:30 +08:00
Marek Siarkowicz 1b3f301cc2 tests: Share SpawnCmdWithLogger between coverage and no coverage scenarios
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:10:11 +02:00
Marek Siarkowicz 574b3d33d1 test: Remove BinDir global variable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
Marek Siarkowicz 9bba38e51f tests: Include etcd-last-release in BinPath
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
Marek Siarkowicz 0f9e15fc37 test: Remove accessing etcd via BinDir
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
Marek Siarkowicz 89a1e7978c tests: Configure coverage binary paths via init
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
Marek Siarkowicz d3b9951126 tests: Refactor BinPath into struct
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:49 +02:00
Marek Siarkowicz de0efc9aa4 tests: Move global e2e configuration into one file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:28 +02: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
Benjamin Wang bf6a1d7264
Merge pull request #14591 from ZoeShaw101/dev
Tests: Check Watch response error not nil to avoid runtime panic.
2022-10-16 17:00:18 +08:00
王霄霄 2751ec6479 integration: check Watch response error not nil to avoid runtime panic.
Fixes issue: #14259

Signed-off-by: 王霄霄 <1141195807@qq.com>
2022-10-16 11:41:11 +08:00
Benjamin Wang 24ad49091e test: resolve review comment for the feature of dynamically adding new member
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-15 06:09:58 +08:00
Vitalii Levitskii 11e23f1ef7 Added member interaction into EtcdProcessCluster
Rebased this PR. There is no response from the original author,
so Benjamin (ahrtr@) continue to work on this PR.

Signed-off-by: Vitalii Levitskii <vitalii@uber.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-15 05:53:07 +08: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
Benjamin Wang a5fb57b485
Merge pull request #14586 from serathius/pattern
tests: Use bash like patterns in TestAuthority instead of string fo…
2022-10-14 06:11:36 +08:00
Marek Siarkowicz fdce1b38fb tests: Use bash like patterns in TestAuthority instead of string formating
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-13 16:45:27 +02:00
Marek Siarkowicz 81bd3fb9f9 tests: Pass only etcd related environment variables during e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-13 16:44:22 +02:00
Benjamin Wang 78380ae6b8 functional-test: move the check on log-outputs out of the 'if clientTLS' branch
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-13 16:33:02 +08:00
Benjamin Wang b48641e5f2
Merge pull request #14348 from VinozzZ/add-integration-test-for-tracing
embed: add integration test for distributed tracing
2022-10-13 02:11:59 +08:00
Benjamin Wang 328a33668b functional_test: stop etcd and cleanup data when test is successful
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-09 09:23:13 +08:00
Benjamin Wang 742c925a27
Merge pull request #14387 from lavacat/main-functional
functional: remove SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT command
2022-10-09 08:25:25 +08:00
Marek Siarkowicz 510f26e34c Remove mention of ETCDCTL_API environment variable as it was removed on main branch
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-07 21:22:06 +02:00
Wei Fu b15f6bf978 integration: deflaking TestMaintenanceSnapshotCancel/Timeout
Since http2 spec defines the receive windows's size and max size of
frame in the stream, the underlayer - gRPC client can pre-read data
from server even if the application layer hasn't read it yet.

And the initialized cluster has 20KiB snapshot, which can be pre-read
by underlayer. We should increase the snapshot's size, just in case
that the io.Copy won't return the canceled or timeout error.

Fixes: #14477

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-10-06 11:03:51 +08: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
Kafuu Chino f1d4935e91 *: avoid closing a watch with ID 0 incorrectly
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>

add test
2022-09-26 20:30:33 +08: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
Benjamin Wang cb5f7276c3 Bump go 1.19: upgrade go version to 1.19.1 in the pipeline
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Benjamin Wang cd0b1d0c66 Bump go 1.19: upgrade go version to 1.19 in all go.mod files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Marek Siarkowicz 026794495f
Merge pull request #14494 from demoManito/remove/redundant-type-conversion
etcd: remove redundant type conversion
2022-09-21 11:34:19 +02:00
Benjamin Wang 2441a24cee
Merge pull request #14493 from demoManito/style/format-import-order
etcd: format import order
2022-09-21 06:03:31 +08:00
demoManito f67ec10779 etcd: format import order
golang CodeReviewComments:
https://github.com/golang/go/wiki/CodeReviewComments#imports

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 18:41:39 +08:00
Benjamin Wang c113f93d79
Merge pull request #14482 from fuweid/testing-curl-maxstream
e2e: make maxstream test stable
2022-09-20 12:30:10 +08:00
demoManito a9c3d56508 etcd: remove redundant type conversion
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 11:26:02 +08:00
Wei Fu 16884373b9 e2e: submitConcurrentWatch runs with ExecuteWithTimeout
Use testutils.ExecuteWithTimeout to make sure that the all active
streams are ready in time.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-09-20 11:03:51 +08:00
Wei Fu ec847337d7 e2e: make maxstream test stable
submitConcurrentWatch use sleep 3s to wait for all the watch connections
ready. When the number of connections increases, like 1000, the 3s is not
enough and the test case becomes flaky.

In this commit, spawn curl process and check the ouput line with
`created":true}}` to make sure that the connection has been initialized
and ready to receive the events. It is reliable to test the following
range request.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-09-20 10:41:59 +08:00
Benjamin Wang 5344085338
Merge pull request #14491 from ahrtr/bump_jwt_4.4.2
etcd: Bump golang-jwt/jwt/ version to 4.4.2
2022-09-20 10:18:44 +08:00
Sahdev Zala ad4a465383
Merge pull request #14492 from cmurphy/bump-golang-x-net
*: Update golang.org/x/net to latest
2022-09-19 22:11:43 -04:00
Colleen Murphy 7ea2a3d7cb *: Update golang.org/x/net to latest
Update golang.org/x/net to address CVE-2022-27664.

Signed-off-by: Colleen Murphy <colleen.murphy@suse.com>
2022-09-19 16:01:45 -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
Benjamin Wang 09db6ec1d7 etcd: Bump golang-jwt/jwt/ version to 4.4.2
github.com/golang-jwt/jwt adds go mod support startig from 4.0.0,
and it's backwards-compatible with existing v3.x.y tags.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-20 04:06:47 +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
Benjamin Wang d657f2f66b Test: increase the TestKVDelete's timeout to 15s
Sometimes it just needs more time to execute the test case,
so increase the timeout from 10s to 15s.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-18 04:26:30 +08: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
Sahdev Zala cdf4228673
Merge pull request #14308 from dusk125/main
server/etcdmain: add configurable cipher list to gRPC proxy listener
2022-09-16 12:15:08 -04:00
demoManito 5b26fc0101 fix test
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 17:08:29 +08: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
Bogdan Kanivets c31d758189 functional: remove SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT command
Problem: both SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT and test.sh
will attempt to stop agents and remove directories.

Solution: since test.sh creates directories and starts test, it should be
responsible for cleanup.

See https://github.com/etcd-io/etcd/issues/14384

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-09-15 10:55:32 -07:00
Marek Siarkowicz b5bbf04503
Merge pull request #14460 from ahrtr/fix_TestV3AuthRestartMember_20220913
Integration_test: fix the flaky test TestV3AuthRestartMember
2022-09-14 09:44:15 +02:00