13 Commits

Author SHA1 Message Date
Wei Fu
4704a5af3a *: fix unused issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:37:18 +08:00
Benjamin Wang
7d95c68b48 test: support regular expression matching on the response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-25 15:00:35 +01:00
Hitoshi Mitake
c9b368119e tests: e2e and integration test for timetolive
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
2023-04-26 20:35:20 +09: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
Marek Siarkowicz
dcd0d3fc9c tests: Extract e2e cluster setup to separate package 2021-10-19 13:06:40 +02:00
Arda Güçlü
65686efa4a Decouple prefixArgs from os.Env dependency
prefixArgs uses os.Setenv in e2e tests instead envMap.
This creates overwrites in some test cases and have an impact
on test quality and isolation between tests.
This PR uses ctlcontext envMap in each tests with high priority
and merges os environment variables with low priority.
2021-09-13 12:28:56 +03:00
Dan Mace
37c95c9fd4 tests: prevent cross-test contamination via shared state
The e2e tests can be flaky due to various tests mutating shared mutable
fixtures, causing non-deterministic behavior depending on the test set, order,
etc.

For example, `configTLS` is mutated in at least two tests in such a way that the
config is potentially invalidated for any subsequent test running in the same
process (e.g. by setting the `enableV2` field). This particular example caused
a substantial amount of confusion diagnosing the new test introduced for
https://github.com/etcd-io/etcd/pull/12370.

Independent tests should not share mutable state unless deliberately. This patch
refactors the e2e test config fixtures to safeguard against these problems by
replacing the package variables (which cannot easily be made immutable) with
functions that return new instances.
2020-10-14 13:58:00 -04:00
Gyuho Lee
42bef8460c *: clean up code format
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-21 16:34:56 -07:00
Gyuho Lee
72211db7cf tests: move internal "e2e"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 10:37:28 -07:00