8 Commits

Author SHA1 Message Date
Chao Chen
e004c91d36 migrate e2e & integration role_test to common 2022-05-10 10:17:16 -07: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
赵延
64b01a7a8d
Enhance the root permission, when root role exist, it always return rootPerm. (#13006)
etcdctl role grant-permission root readwrite foo.
see etcdctl role get root output.
Before:
Role root
KV Read:
        foo
KV Write:
        foo
After:
Role root
KV Read:
        [, <open ended>
KV Write:
        [, <open ended>
2021-05-24 14:58:00 -07:00
horizonzy
6ab56fc237 enhance GetRole output when role is 'root' and the response perm is nil.
Before output:
Role root
KV Read:
KV Write:

After output:
Role root
KV Read:
	[, <open ended>
KV Write:
	[, <open ended>
2021-05-19 17:35:13 +08:00
Piotr Tabor
26f9b4be8f e2e tests were leaking 'defunc' etcdctl processes.
The commit ensures that spawned etcdctl processes are "closed",
so they perform proper os wait processing.
This might have contributed to file-descriptor/open-files limit being
exceeded.
2021-01-11 11:55:30 +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
Gyuho Lee
72211db7cf tests: move internal "e2e"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 10:37:28 -07:00