21 Commits

Author SHA1 Message Date
thirdkeyword
fbda591866 fix some typos
Signed-off-by: thirdkeyword <fliterdashen@gmail.com>
2024-03-25 10:34:44 +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
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
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
Clark
fa9ee5cce9 tests: TestRunner.NewCluster accepts options
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-10-31 15:26:08 +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
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
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
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
Marek Siarkowicz
46fe4b8e1c tests: Rename common client lease methods to match
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-08-26 07:12:47 +02:00
Marek Siarkowicz
72bec6fbc2 tests: Add context to common client interface
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-08-26 07:12:45 +02:00
Marek Siarkowicz
ee08770bfb tests: Make common framework context aware 2022-05-16 14:35:44 +02:00
Marek Siarkowicz
9beb29916e tests: Extract cluster test cases 2022-05-13 14:41:53 +02:00
Bogdan Kanivets
67f3bb3ad4 tests/common/lease: don't use revision to wait for leases
Problem: TestLeaseGrantAndList is flaky because lists won't match at the end.
Test uses revision to verify that all members got leases. But checking for revision isn't enough.

Solution: use size of the list to stop polling.
2022-04-25 10:24:32 -07:00
Danielle Lancashire
f71196d113 tests/common/lease: Wait for correct lease list response
We don't consistently reach the same etcd server during the lifetime of
a test and in some cases, this means that this test will flake if an
etcd server was slow to update its state and the test hits the outdated
server.

Here we switch to using an `Eventually` case which will wait upto a
second for the expected result before failing - with a 10ms gap between
invocations.

```
[tests(dani/leasefix)] $ gotestsum -- ./common -tags integration -count 100 -timeout 15m -run TestLeaseGrantAndList
✓  common (2m26.71s)

DONE 1600 tests in 147.258s
```
2022-04-04 15:43:17 +02:00
Piotr Tabor
ed1bc447c7 Flakes: Additional logging and timeouts to understand common flakes. 2022-04-03 14:48:36 +02:00
Danielle Lancashire
87740f6c7b tests: Migrate TestCtlV3LeaseRevoke.* to common 2022-03-18 16:47:42 +00:00
Danielle Lancashire
36279e0797 tests: migrate TestCtlV3LeaseKeepAliveOnce.* to common 2022-03-18 16:47:42 +00:00
Danielle Lancashire
c12e03c8e6 tests: migrate TestCtlV3LeaseTestTimeToLiveExpired.* to common 2022-03-18 16:47:42 +00:00
Danielle Lancashire
b7beaf9c62 tests: migrate TestCtlV3LeaseGrantLeases.* to common 2022-03-18 16:43:55 +00:00
Danielle Lancashire
6b7be72a43 tests: migrate TestCtlV3LeaseGrantTimeToLive.* to common 2022-03-18 16:43:20 +00:00