9 Commits

Author SHA1 Message Date
Benjamin Wang
bbee33e20a test: increase the timeout for the flaky test TestCtlV3AuthCertCNWithWithConcurrentOperation
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-15 10:35:44 +01:00
Marek Siarkowicz
a5a5862e0b tests: Make using etcdctl expicit in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-06 13:29:37 +02:00
Wei Fu
4d0b91947e chore: delete // +build buildtag by go fix
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:17:05 +08:00
Marek Siarkowicz
371179e292 tests: Trigger raftBeforeLeaderSend
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-17 14:17:16 +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
Marek Siarkowicz
dcd0d3fc9c tests: Extract e2e cluster setup to separate package 2021-10-19 13:06:40 +02:00
Piotr Tabor
a7f340216d Reformat code according to 'gotip' rules.
In practices adds annotations in the new syntax:
```
+//go:build !linux
 // +build !linux
```

Fixes failing gotip PASSES='fmt' check:
https://travis-ci.com/github/etcd-io/etcd/jobs/486453806
2021-02-26 10:14:46 +01: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
Piotr Tabor
093282f5ea tests/e2e: cluster_proxy tests use CN-less cert for etcd-server auth.
Change tests/e2e to use proper (client-nocn.crt) certificate when
running in tags="cluster_proxy" mode.

Thanks to this (and previous in this PR) changes, the following test run
finally succeeds:
  ./build && go test --tags "cluster_proxy" -v ./tests/e2e/...
2020-09-07 12:55:01 +02:00