Gyuho Lee
b5cefb5b3d
Merge pull request #12392 from ironcladlou/fixture-mutations
...
tests: prevent cross-test contamination via shared state
2020-11-19 10:05:42 -08:00
Piotr Tabor
aaf423e962
server: Update imports.
...
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +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
371ddf0b69
tests: Update diagnostic update in tests after change of proto version.
2020-10-14 18:46:38 +02:00
Piotr Tabor
de55bb6331
pkg: Rename imports after making 'pkg' a module
...
find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
2020-10-13 00:09:27 +02:00
Piotr Tabor
28f2b07623
*: Update references to code moved to the api/ dir.
...
Follow up to file-moves done in the previous commit.
The commit contains purely mechanical consequences of execution (apart
of scripts/genproto.sh):
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/v3rpc/rpctypes|v3/api/v3rpc/rpctypes|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/version|v3/api/version|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/mvcc/mvccpb|v3/api/mvccpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/etcdserverpb|v3/api/etcdserverpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/membership/membershippb|v3/api/membershippb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/auth/authpb|v3/api/authpb|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/mvcc/mvccpb/kv.proto|/api/mvccpb/kv.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/auth/authpb/auth.proto|/api/authpb/auth.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/etcdserver/api/membership/membershippb/membership.proto|/api/membershippb/membership.proto|g'
I also modified manually paths in scripts/genproto.sh.
% go fmt ./...
2020-10-06 11:56:16 +02:00
Brandon Philips
96cce208c2
go.mod: use go.etcd.io/etcd/v3 versioning
...
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.
Used this tool to update package imports:
https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
yoyinzyc
5127cfb45f
e2e: test curl auth on onoption user
2019-12-10 11:25:16 -08:00
Gyuho Lee
80efba3368
tests/e2e: fix curl proclaim error message
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 21:28:15 -07:00
Hitoshi Mitake
7bbc536e1c
tests/e2e: initialize UserAddOptions{} field in testV3CurlAuth()
2019-06-06 23:07:41 +09:00
Hitoshi Mitake
8257dfdb51
e2e: add test cases for a user without password
2019-05-30 21:59:30 +09:00
Hitoshi Mitake
5a67dd788d
*: support creating a user without password
...
This commit adds a feature for creating a user without password. The
purpose of the feature is reducing attack surface by configuring bad
passwords (CN based auth will be allowed for the user).
The feature can be used with `--no-password` of `etcdctl user add`
command.
Fix https://github.com/coreos/etcd/issues/9590
2019-05-30 21:59:30 +09:00
Gyuho Lee
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
Hitoshi Mitake
69e2faec00
tests: update TestV3CurlAuthClientTLSCertAuth for using cert with empty CN
2019-01-23 03:26:34 +09:00
Sam Batschelet
99704e2a97
e2e: add ClientTLSCertAuth coverage for curl v3 auth tests
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-01-08 12:31:20 -05:00
Gyuho Lee
d37f1521b7
*: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee
0d13176c99
tests/e2e: do not run cipher suite tests in coverage tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-13 14:32:27 -07:00
Gyuho Lee
d82f726da8
tests/e2e: test client-side cipher suites with curl
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-05 12:59:29 -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