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