11 Commits

Author SHA1 Message Date
Piotr Tabor
c32180d772 tests/e2e,etcdctl,etcdmain: Fix go test --tags cov -v ./tests/e2e
This CL fixes:
  COVERDIR=./coverage PASSES="build_cov" && go test --tags cov -v ./tests/e2e
and is part of the effort to make:
  COVERDIR=coverage PASSES="build_cov cov" ./test
fully pass.

The args passed to ./bin/etcd_test and ./bin/etcdctl_test binaries were
mismatched. The protocol of passing the arguments using
environment variables has been replaces with proper passing of flags.

How the measurement of coverage by e2e tests works:
  1. COVERDIR=./coverage PASSES="build_cov" are generating
./bin/etcd_test and ./bin/etcdctl_test binaries.

  2. These binaries are tests (as coverage can be computed only for
tests) [see ./main_test.go ./etcdctl/main_test.go], but this tests are
running the main logic of the server and uppon termination (or SIGTERM
signal) are writting proper .coverprofile files in the $COVERDIR folder.
The binaries used to take arguments using env variables, but its not
needed any longer. The binaries can consume any command line arguments
that either test (so --test.fooo) or the original binary can consume.

 3.  The tests/e2e (when compiled with the --tags cov) are starting the
_test binaries instead of the original binaries, such that the coverage
is being collected.
2020-09-09 12:56:15 +02:00
Gyuho Lee
2329acf05b etcdmain: log "SdNotify" error/success
I am seeing some silent failures around systemd service.
This will help find out bugs in "go-systemd"

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-24 12:20:20 -07:00
Jingyi Hu
0a05f1a131
etcdmain: remove capnslog (#11612) 2020-02-11 13:45:44 -08:00
poslua
fd2dddb39f vendor: bump go-systemd to v22.0.0 to fix mod tidy error (#11387) 2019-12-04 18:47:14 -08:00
Sergey Shatunov
fbf732d3dc
etcdmain: fix sd_notify for restricted environments
Remove call to dumb IsRunningSystemd() as it doesn't check anything
2019-03-02 23:44:39 +07:00
Gyuho Lee
041b9069a2 *: configure server logger
- Add/Document "logger" to support structured logging.
  - This makes functional tests run easier, since zap logger
    provides built-in log redirect to files.
  - "etcd --logger-option=zap" to enable structured logging.
- Current "capnslog" will still be used as "default".
  - We may switch the default or deprecate "capnslog" in v3.5.
  - Either way, will clearly be documented.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Anthony Romano
7c22d35dff etcdmain: support grpc-proxy/gateway compiled with -tags cov 2017-07-21 11:00:22 -07:00
Gyu-Ho Lee
01dd60c0f7 etcdmain: SdNotify when gateway, grpc-proxy are ready
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-09 10:10:21 -08:00
Xiang Li
6d8c647db8 *: initial implementation of grpc-proxy 2016-06-29 12:06:04 -07:00
Gyu-Ho Lee
ef44f71da9 *: update LICENSE header 2016-05-12 20:51:48 -07:00
Xiang Li
a300be92dc *: initial support for gatway
etcd gatway is a simple l4 gateway that forwards tcp connections to
the given endpoints.
2016-05-11 09:44:50 -07:00