395 Commits

Author SHA1 Message Date
Benjamin Wang
5cc9f7f771
Merge pull request #16835 from chaochn47/e2e-livez-readyz
add livez readyz e2e tests
2023-10-29 15:54:57 +00:00
Chao Chen
42d9e43e5f tests/e2e: enhance livez readyz e2e tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 18:00:14 -07:00
Marek Siarkowicz
e8ae83fac4 Add e2e tests for livez readyz
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 17:57:12 -07:00
Chao Chen
8a6c1335e2 v3rpc: run health notifier to listen on online defrag state change
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 17:49:24 -07:00
Chao Chen
ea035471ce online defrag notifies gRPC health server to expose NOT_SERVING status
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 08:58:33 -07:00
Chao Chen
1324f03254 add existing http health check handler e2e test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-18 12:42:23 -07:00
Wei Fu
aea1cd0077 feat: enable unparam lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:24:13 +08:00
Benjamin Wang
a92e0de316
Merge pull request #16753 from fuweid/deflake-TestEtcdTLSVersion
tests: deflake TestEtcdTLSVersion
2023-10-13 10:28:04 +01:00
Wei Fu
6f95ea04be tests: deflake TestEtcdTLSVersion
The proc.Stop just sends the SIGTERM to etcd server. The etcd server
needs time to teardown. If we don't wait for it, the etcd server will
hold the port and then next test case, like TestGrpcProxyAutoSync, will
fail to listen on the port 20000.

```bash
file_/__w/etcd/etcd/tests/fixtures/server.crt_--peer-key-file_/__w/etcd/etcd/tests/fixtures/server.key.insecure_--cert-file_/__w/etcd/etcd/tests/fixtures/server2.crt_--key-file_/__w/etcd/etcd/tests/fixtures/server2.key.insecure_--tls-min-version_TLS1.2_--tls-max-version_TLS1.3) (32856): {"level":"info","ts":"2023-10-13T06:12:32.718845Z","caller":"embed/etcd.go:394","msg":"closing etcd server","name":"e1","data-dir":"/tmp/TestEtcdTLSVersion284993522/001","advertise-peer-urls":["https://127.0.0.1:20000"],"advertise-client-urls":["https://0.0.0.0:0"]}
2023-10-13T06:12:32.7399709Z --- PASS: TestEtcdTLSVersion (1.03s)
2023-10-13T06:12:32.7400181Z === RUN   TestGrpcProxyAutoSync
2023-10-13T06:12:32.7401203Z     logger.go:130: 2023-10-13T06:12:32.719Z	INFO	starting server...	{"name": "TestGrpcProxyAutoSync-test-0"}
2023-10-13T06:12:32.7408306Z     logger.go:130: 2023-10-13T06:12:32.719Z	INFO	spawning process	{"args": ["/__w/etcd/etcd/bin/etcd", "--name=TestGrpcProxyAutoSync-test-0", "--listen-client-urls=http://localhost:20000", "--advertise-client-urls=http://localhost:20000", "--listen-peer-urls=http://localhost:20001", "--initial-advertise-peer-urls=http://localhost:20001", "--initial-cluster-token=new", "--data-dir", "/tmp/TestGrpcProxyAutoSync1139610722/001", "--snapshot-count=10000", "--initial-cluster-token=new", "--initial-cluster=TestGrpcProxyAutoSync-test-0=http://localhost:20001", "--initial-cluster-state=new"], "working-dir": "/__w/etcd/etcd/tests/e2e", "name": "TestGrpcProxyAutoSync-test-0", "environment-variables": ["ETCD_VERIFY=all", "EXPECT_DEBUG=true", "PATH=/__t/go/1.21.3/x64/bin:/go/bin:/__t/go/1.21.3/x64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "ETCD_UNSUPPORTED_ARCH=amd64"]}

...

2023-10-13T06:12:32.7559855Z /__w/etcd/etcd/bin/etcd (TestGrpcProxyAutoSync-test-0) (32863): {"level":"fatal","ts":"2023-10-13T06:12:32.735191Z","caller":"etcdmain/etcd.go:181","msg":"discovery failed","error":"listen tcp 127.0.0.1:20000: bind: address already in use","stacktrace":"go.etcd.io/etcd/server/v3/etcdmain.startEtcdOrProxyV2\n\tgo.etcd.io/etcd/server/v3/etcdmain/etcd.go:181\ngo.etcd.io/etcd/server/v3/etcdmain.Main\n\tgo.etcd.io/etcd/server/v3/etcdmain/main.go:40\nmain.main\n\tgo.etcd.io/etcd/server/v3/main.go:31\nruntime.main\n\truntime/proc.go:267"}
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-13 16:48:37 +08:00
Marek Siarkowicz
c34ccfbc06 Dynamically generate flags passed to etcd binary
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 17:31:56 +02:00
Marek Siarkowicz
9f40116fa0 Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
Introduction of round robin 120fc906b3
Added in v0.10.0 https://github.com/golang/net/compare/v0.10.0...v0.11.0

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-10 16:31:42 +02:00
Marek Siarkowicz
f3196e3bbd Avoid timing out and provide a proper error in TestCtlV3GetFormat test
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 11:29:39 +02:00
Benjamin Wang
b385121bec test: add test cases to verify consistent reading right after writing
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-04 15:26:44 +01:00
Marek Siarkowicz
e31de5e3c1 Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
This reverts commit 1713dc67b5149e74cd28bad7c080c646315d0b06.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-03 21:37:18 +02:00
Marek Siarkowicz
11b441b605 Reuse embed.Config in e2e cluster config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-01 09:56:31 +02:00
Benjamin Wang
b8103b0fe4 test: fix the TestCtlV3ConsistentMemberList: set the wait-cluster-ready-timeout as 1ns
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-30 14:21:26 +01:00
Benjamin Wang
0b8cad83d1 address the review comments
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-29 12:58:18 +01:00
Benjamin Wang
628b45c099 test: add a test case to verify consistent memberlist on bootstrap
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:04:47 +01:00
Wei Fu
8870cb3070 *: fix unconvert linter
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:40:45 +08:00
Wei Fu
4704a5af3a *: fix unused issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:37:18 +08:00
Wei Fu
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
Wei Fu
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Wei Fu
df86cadd8b *: fix ineffassign lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 22:19:19 +08:00
Wei Fu
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
Benjamin Wang
5444cdae69 remove all usage of v1 grpc-gateway
1. Manually updated go source file to remove the usage of v1 grpc-gateway;
2. Execute ./scripts/fix.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00
chenyahui
c0aa3b613b Use any instead of interface{}
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +08:00
Benjamin Wang
d687bd0989 test: simply the expected output for some curl test cases"
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-11 13:50:26 +01:00
Benjamin Wang
18f70c2553 test: add test case to cover all election REST APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-10 20:52:40 +01:00
Benjamin Wang
7f2949bac1 test: split watch and election tests to separate files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-09 09:40:45 +01:00
Benjamin Wang
0b27aff79c test: add test case to cover lock restful APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-08 17:04:01 +01:00
Benjamin Wang
0e972a1a24
Merge pull request #16545 from ahrtr/member_rest_20230905
test: add test cases to cover cluster RESTful APIs
2023-09-07 14:28:19 +01:00
Benjamin Wang
b2ee90c162 test: remove apiPrefix and withApiPrefix
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-05 14:41:11 +01:00
Benjamin Wang
ce64fbe3f9 test: add test cases to cover cluster RESTful APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-05 14:09:52 +01:00
Benjamin Wang
dc8011570c test: add e2e test cases to cover all auth related RESTful APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-03 20:26:25 +01:00
James Blair
7faab4aa44
Maintain a consistent naming standard for curlv3 tests.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-09-03 12:04:50 +12:00
Benjamin Wang
144dcf1ad3
Merge pull request #16518 from ahrtr/auth_test_20230901
test: move all auth related test cases into a separate test file
2023-09-03 03:23:02 +08:00
Benjamin Wang
818561f43f test: move all auth related test cases into a separate test file
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-02 07:29:54 +01:00
Marek Siarkowicz
e09cc1e82c
Merge pull request #16516 from SagarRawat24/bookworm
update the debian12 and bookworm remove --v 1.0
2023-09-01 20:52:38 +02:00
sagar rawat
245b58a1e2 update the debian12 and bookworm remove --v 1.0
Signed-off-by: sagar rawat <sagarrawat24291@gmail.com>
2023-09-01 16:19:29 +05:30
Benjamin Wang
b4803fb395 test: refactor the existing KV RESTful test cases and also add new cases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-01 09:13:51 +01:00
Benjamin Wang
02c01f04d7 test: move all KV related RESTful APIs into a separate test file
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-30 16:19:15 +01:00
Benjamin Wang
a7330692bd test: add v3 curl test to cover all maintainence REST APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-30 15:09:40 +01:00
Benjamin Wang
7d95c68b48 test: support regular expression matching on the response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-25 15:00:35 +01:00
Marek Siarkowicz
5a54fe6dd1
Merge pull request #16457 from serathius/downgrade-membership
Add membership changes to downgrade tests
2023-08-22 12:14:40 +02:00
Benjamin Wang
30b5c37190 test: verify snap.Load() is sucessful
Otherwise the following snap.Data may run into nil pointer panic.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-22 10:08:34 +01:00
Marek Siarkowicz
1c0db872d9 Add membership changes to downgrade tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-22 10:18:30 +02:00
Geeta Gharpure
7b3daf612d Minor update to test code to remove a local var
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-21 19:13:36 +00:00
Geeta Gharpure
e4f239408c Update test for v2 deprecation to verify membership match
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-18 16:14:35 +00:00
Wei Fu
e4e05c5713 tests/*: redirect metrics into file
Redirect metrics data into file to reduce output.

Fix: #16422

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-18 16:48:10 +08:00
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