Commit Graph

52 Commits (4cbb949595b7bbdc01a9d68a32b332e79025934c)

Author SHA1 Message Date
Marek Siarkowicz 027d8efa25 test: Bump release tests to use 3.5.0
Using cut to split by '-' to remove `-rc.0` suffix.
2021-07-14 13:24:50 +02:00
Marek Siarkowicz 86f68b9374 *: Add missing file licenses and Fix static analysis prevent skipping them in future 2021-06-29 12:52:02 +02:00
Piotr Tabor ea8b9e6c18 Improve output of the 'functional' tests
- Use go testing infrastructure, such that logs are printed only in
case of failure.
 - Split the test into multiple sub-round and sub-round-testcases such
   that tree of execution reflects the logic.
 - Use 'development' loggers that are formatting the output to be human
readable.
2021-05-31 15:31:48 +02:00
Lili Cosic e0e4ddc268 test.sh: Reference test.sh instead of deprecated test 2021-05-20 10:00:27 +02:00
Piotr Tabor c09aca1ba4 Split etcdctl into etcdctl (public API access) & etcdutl (direct surgery on files)
Motivation is as follows:

  - etcdctl we only depend on clientv3 APIs, no dependencies of bolt, backend, mvcc, file-layout
  - etcdctl can be officially supported across wide range of versions, while etcdutl is pretty specific to file format at particular version.
it's step towards desired modules layout, documented in: https://etcd.io/docs/next/dev-internal/modules/
2021-05-17 11:54:03 +02:00
Piotr Tabor c7a76470d5 Fix path to the coverage folder for e2e tests. 2021-05-16 09:49:50 +02:00
Piotr Tabor d4a8093ea5 Switch release-test (upgrade test) to use etcd 3.4 (instead of 3.3) as upgrade-base. 2021-04-08 01:15:16 +02:00
Piotr Tabor 24d2a9da70 test.sh: Turn off enforcement for minimal go.sum.
It seems that generated go.sum differs between different go versions.
This was introducing noise in the tests.
2021-04-07 20:26:10 +02:00
Piotr Tabor 3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
Piotr Tabor 62d3eded87 test.sh: Temporarilly disable the "eeshew you" fmt check. 2021-03-24 20:40:13 +01:00
Piotr Tabor 87258efd90 Integration tests: Use zaptest.Logger based testing.TB
Thanks to this the logs:
  - are automatically printed if the test fails.
  - are in pretty consistent format.
  - are annotated by 'member' information of the cluster emitting them.

Side changes:
  - Set propert default got DefaultWarningApplyDuration (used to be '0')
  - Name the members based on their 'place' on the list (as opposed to
'random')
2021-03-09 18:19:51 +01:00
Piotr Tabor 339f8fa4bd test.sh: Run integration tests with -v and shorter deadline.
The purpose of this change is to learn more about flake cases like:
  https://travis-ci.com/github/etcd-io/etcd/jobs/488324449

```
% (cd tests && 'env' 'go' 'test' '-timeout=30m' '--race=false' '--cpu=2' './integration/...')
stderr: go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
ok  	go.etcd.io/etcd/tests/v3/integration	197.295s
ok  	go.etcd.io/etcd/tests/v3/integration/client	0.089s
ok  	go.etcd.io/etcd/tests/v3/integration/client/examples	0.038s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3	70.365s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/concurrency	3.169s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/connectivity	100.535s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/examples	1.341s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes	3.277s

No output has been received in the last 10m0s,
```
2021-03-04 22:23:05 +01:00
Piotr Tabor f0ecad00e3 Use temp-directory that is covered by framework level cleanup
Prior to this PR, the e2e tests where creating dirs like:
```
/tmp/testname1.etcd030299846
/tmp/testname0.etcd039445123
/tmp/testname0.etcd206372065
```
and not cleaning them, that led to disk-space-exceeded flakes.

After the PR, the testing.TB tempdir mechanism is used and the names are
being cleaned and are more miningful:

```
../../bin/etcd --name test-TestCtlV3EndpointHashKV-2 --listen-client-urls http://localhost:20010 --advertise-client-urls http://localhost:20010 --listen-peer-urls https://localhost:20011 --initial-advertise-peer-urls https://localhost:20011 --initial-cluster-token new --data-dir /tmp/TestCtlV3EndpointHashKV429176179/003 --snapshot-count 100000 --experimental-initial-corrupt-check --peer-auto-tls --initial-cluster test-TestCtlV3EndpointHashKV-0=https://localhost:20001,test-TestCtlV3EndpointHashKV-1=https://localhost:20006,test-TestCtlV3EndpointHashKV-2=https://localhost:20011
```
2021-01-30 13:25:55 +01:00
Piotr Tabor 90d1b838ad Fix shellcheck warnings: Escaping.
```
build:3:65: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
test:3:64: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/fix.sh:23:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/fix.sh:23:46: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/fix.sh:30:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:38:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:53:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:73:23: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
scripts/genproto.sh:73:33: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
scripts/genproto.sh:74:69: note: Backslash is literal in "\1". Prefer explicit escaping: "\\1". [SC1117]
scripts/genproto.sh:74:78: note: Backslash is literal in "\2". Prefer explicit escaping: "\\2". [SC1117]
scripts/genproto.sh:75:40: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
scripts/genproto.sh:75:52: note: Backslash is literal in "\1". Prefer explicit escaping: "\\1". [SC1117]
scripts/genproto.sh:91:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:115:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
./test.sh:71:29: warning: Quote to prevent word splitting, or split robustly with mapfile or read -a. [SC2206]
./test.sh:400:28: note: Backslash is literal in "\t". Prefer explicit escaping: "\\t". [SC1117]
./test.sh:406:33: note: Backslash is literal in "\t". Prefer explicit escaping: "\\t". [SC1117]
./test.sh:415:36: note: Backslash is literal in "\*". Prefer explicit escaping: "\\*". [SC1117]
./test.sh:415:176: note: Backslash is literal in "\'". Prefer explicit escaping: "\\'". [SC1117]
./test.sh:493:56: note: Backslash is literal in "\.". Prefer explicit escaping: "\\.". [SC1117]
./test.sh:601:57: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
./test.sh:601:64: note: Backslash is literal in "\)". Prefer explicit escaping: "\\)". [SC1117]
./test.sh:601:67: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
./test.sh:601:74: note: Backslash is literal in "\)". Prefer explicit escaping: "\\)". [SC1117]
./test.sh:601:77: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
./test.sh:601:84: note: Backslash is literal in "\)". Prefer explicit escaping: "\\)". [SC1117]
./test.sh:601:91: note: Backslash is literal in "\1". Prefer explicit escaping: "\\1". [SC1117]
./test.sh:601:94: note: Backslash is literal in "\2". Prefer explicit escaping: "\\2". [SC1117]
./test.sh:601:103: note: Backslash is literal in "\3". Prefer explicit escaping: "\\3". [SC1117]
```
2021-01-29 22:32:43 +00:00
Piotr Tabor a8c935eab0 test.sh: Stop requiring/defaulting CPU flag to 4 2021-01-28 19:15:04 +00:00
Piotr Tabor 351bdb33c5 Split intengration/clientv3 tests into multiple packages
They used to take >10min with coverage, so were causing interrupted
Travis runs.

Know thay fit in 100-150s (together), thanks also to parallel
execution.
2021-01-23 11:12:44 +01:00
Piotr Tabor 88ee005a0f Reduce verbosity of coverage collection. 2021-01-23 08:59:19 +01:00
Piotr Tabor 486687843b Fix code coverage measurement. 2021-01-19 15:41:36 +01:00
Piotr Tabor 577c898fee scripts: Integrate ./scripts/release with new code for tagging modules.
Changes:
  - signing tags.
  - allows to override BRANCH and REPOSITORY using env variables.

Tested by a release in my private fork:
  BRANCH="20201126-ptabor-release" REPOSITORY="git@github.com:ptabor/etcd.git" ./scripts/release 3.5.0-alpha.20
2021-01-15 12:31:44 +01:00
Piotr Tabor 84b5b87fb2 Make test.sh scripts OSX/BSD compatible:
- build & test scripts deprecated. Call *.sh variants.
  This will avoid delete the symlinks and get rid of
  subtle dependency on 'sed --follow-symlinks' on OsX/BSD sed.

- Fix parameters to mktemp
2021-01-12 16:29:00 +01:00
Piotr Tabor bc9e433ca2 tools: Migrate remaining tools to gobin
Replace ./scripts/install_tool.sh with `gobin`, such that we have
consistent handling for all tools needed for build and consistent
versioning within ./tools/mod/go.mod.

Side changes:
  - Expose /scripts/fix.sh that fixes formatting and bom across modules
  - Expose *.sh variants of scripts like build and ./test (first step
towards replacement).
  - Make stderr output of commands explicit and make commands use
different color than callouts.
2020-10-13 19:33:01 +02:00
Blake Mizerany e2798405f6 remove test.sh 2014-09-03 09:20:06 -07:00
Yicheng Qin 02ced2c2d7 v1: deprecate v1 support
Etcd moves to 0.5 without the support of v1.
2014-09-03 09:19:49 -07:00
Yicheng Qin a1a91ab75a chore(server): deprecate mod temporarily 2014-04-15 12:50:36 -07:00
Doug MacEachern d73390a674 fix(server): avoid race conditions in Run/Stop
- don't close ready channel until PeerServer is listening.
  avoids possible panic in Stop() if PeerServer is nil.

- avoid data race in Run() (err variable was shared between 2 goroutines)

- avoid data race in PeerServer Start/Stop (PeerServer.closeChan)
2014-04-15 09:24:54 -07:00
Xiang Li 0b790abd46 Merge pull request #705 from unihorn/61
feat: set NOCOW for log directory when in btrfs
2014-04-14 16:40:38 -04:00
Xiang Li dce461dbd7 tests(test.sh) open race option 2014-04-11 19:49:41 -04:00
Yicheng Qin bda8849c3b chore(btrfs): rename fs to btrfs
This is because the actions is specific for btrfs.
2014-04-09 15:06:17 -07:00
Yicheng Qin b06d2796f8 feat: set NOCOW for log directory when in btrfs 2014-04-09 10:00:21 -07:00
Yicheng Qin 915cc53d83 chore(test.sh): move gofmt check to the end of testing
So it won't be blocked on gofmt check.
2014-04-03 17:04:35 -07:00
Yicheng Qin 3fece6a716 feat(test): check format conditions in test
And add option '--fmt' in build script to gofmt files automatically.
2014-04-02 17:57:53 -07:00
Brandon Philips 68383b1293 fix(server/v1): don't fail put on new v1 key
We weren't checking for PrevNode being nil in the v1 code path. Do this
and add a test.

Fixes #557
2014-02-10 18:59:56 -08:00
Brian Waldon 42363001b4 fix(v2): Use case-insensitive check on bool query params
Fix issue #261
2014-02-07 14:29:08 -08:00
Brandon Philips 147235f8f5 fix(test.sh): re-add the config tests
These tests were left behind in the move to put config in its own
package.
2014-02-06 22:52:50 -08:00
Brandon Philips 0b9c5c975e fix(test.sh): use . not source 2014-02-02 17:01:21 -08:00
Brandon Philips 33be0e09fe fix(build/test.sh): use new GOPATH setup 2014-02-02 16:57:36 -08:00
Brandon Philips 0f97e3528a chore(build): use third_party.go
use the third_party.go project to replace our update script. This
requires moving a few things around and gets rid of a few annoying bugs:

- You can now bump individual packages
- A new src directory isn't created on build
- Less shell scripting!
- Things get built into ./bin/
2014-01-14 22:14:47 -08:00
Ben Johnson 355bd6df9b Fix Travis CI. 2014-01-08 16:41:01 -07:00
Ben Johnson 8d25dac1ba Revert test.sh changes. 2014-01-08 16:21:22 -07:00
Ben Johnson 4acfc26c5e Add event-based debugging output. 2013-12-23 16:01:05 -07:00
Ben Johnson e76b7d1e8b Add mod/lock version. 2013-12-04 22:24:04 -07:00
Ben Johnson f3d438a93f Add mod/lock connection monitoring. 2013-12-04 16:23:27 -07:00
Ben Johnson df20be775c Fix test harness. 2013-12-02 15:43:37 -07:00
Ben Johnson 22c2935ddb Initial mod_lock acquire. 2013-11-27 16:59:05 -07:00
Ben Johnson bc0e07bca2 Add tiered configuration. 2013-10-21 21:37:25 -06:00
Ben Johnson 62b890839a Merge branch '0.2' of https://github.com/coreos/etcd into v2-handler-tests
Conflicts:
	test.sh
2013-10-18 08:54:51 -06:00
Xiang Li a6f7069264 fix use right gopath 2013-10-17 20:57:00 -07:00
Ben Johnson dcef04b796 Add v2 unit tests. 2013-10-17 21:52:15 -06:00
Ben Johnson 4fb3a01f25 Update build script to fail on error. 2013-10-17 10:02:59 -06:00
Ben Johnson b4d311d6a1 Reintegrate functional tests into etcd. 2013-10-16 13:58:03 -06:00