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