From f7ee30cc416f325e690f3939ee07ab098b6fcddf Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Thu, 24 Feb 2022 13:13:18 +0100 Subject: [PATCH 1/7] tests: Implement remaining GetOptions fields --- tests/common/kv_test.go | 2 +- tests/framework/e2e.go | 10 ------ tests/framework/e2e/etcdctl.go | 53 ++++++++++++++++++++++++++-- tests/framework/integration.go | 27 +++++++++++--- tests/framework/interface.go | 2 +- tests/framework/testutils/options.go | 18 +++++----- 6 files changed, 85 insertions(+), 27 deletions(-) diff --git a/tests/common/kv_test.go b/tests/common/kv_test.go index b6a37fe50..54bda9915 100644 --- a/tests/common/kv_test.go +++ b/tests/common/kv_test.go @@ -33,7 +33,7 @@ func TestKVPut(t *testing.T) { if err := cc.Put(key, value); err != nil { t.Fatalf("count not put key %q, err: %s", key, err) } - resp, err := cc.Get(key, testutils.WithSerializable()) + resp, err := cc.Get(key, testutils.GetOptions{Serializable: true}) if err != nil { t.Fatalf("count not get key %q, err: %s", key, err) } diff --git a/tests/framework/e2e.go b/tests/framework/e2e.go index 094628a37..7b7769ec9 100644 --- a/tests/framework/e2e.go +++ b/tests/framework/e2e.go @@ -19,9 +19,7 @@ import ( "testing" "go.etcd.io/etcd/client/pkg/v3/testutil" - clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/tests/v3/framework/e2e" - "go.etcd.io/etcd/tests/v3/framework/testutils" ) type e2eRunner struct{} @@ -58,11 +56,3 @@ func (c *e2eCluster) Client() Client { type e2eClient struct { *e2e.EtcdctlV3 } - -func (c e2eClient) Get(key string, opts ...testutils.GetOption) (*clientv3.GetResponse, error) { - o := testutils.GetOptions{} - for _, opt := range opts { - opt(&o) - } - return c.EtcdctlV3.Get(key, o) -} diff --git a/tests/framework/e2e/etcdctl.go b/tests/framework/e2e/etcdctl.go index b0a53afd1..90dd4856d 100644 --- a/tests/framework/e2e/etcdctl.go +++ b/tests/framework/e2e/etcdctl.go @@ -44,15 +44,64 @@ func (ctl *EtcdctlV3) Get(key string, o testutils.GetOptions) (*clientv3.GetResp if o.Serializable { args = append(args, "--consistency", "s") } - cmd, err := SpawnCmd(append(args, "get", key, "-w", "json"), nil) + args = append(args, "get", key, "-w", "json") + if o.End != "" { + args = append(args, o.End) + } + if o.Revision != 0 { + args = append(args, fmt.Sprintf("--rev=%d", o.Revision)) + } + if o.Prefix { + args = append(args, "--prefix") + } + if o.Limit != 0 { + args = append(args, fmt.Sprintf("--limit=%d", o.Limit)) + } + if o.FromKey { + args = append(args, "--from-key") + } + if o.CountOnly { + args = append(args, "-w", "fields", "--count-only") + } else { + args = append(args, "-w", "json") + } + switch o.SortBy { + case clientv3.SortByCreateRevision: + args = append(args, "--sort-by=CREATE") + case clientv3.SortByModRevision: + args = append(args, "--sort-by=MODIFY") + case clientv3.SortByValue: + args = append(args, "--sort-by=VALUE") + case clientv3.SortByVersion: + args = append(args, "--sort-by=VERSION") + case clientv3.SortByKey: + // nothing + default: + return nil, fmt.Errorf("bad sort target %v", o.SortBy) + } + switch o.Order { + case clientv3.SortAscend: + args = append(args, "--order=ASCEND") + case clientv3.SortDescend: + args = append(args, "--order=DESCEND") + case clientv3.SortNone: + // nothing + default: + return nil, fmt.Errorf("bad sort order %v", o.Order) + } + cmd, err := SpawnCmd(args, nil) if err != nil { return nil, err } + var resp clientv3.GetResponse + if o.CountOnly { + _, err := cmd.Expect("Count") + return &resp, err + } line, err := cmd.Expect("kvs") if err != nil { return nil, err } - var resp clientv3.GetResponse err = json.Unmarshal([]byte(line), &resp) return &resp, err } diff --git a/tests/framework/integration.go b/tests/framework/integration.go index b37111aa4..c628d7080 100644 --- a/tests/framework/integration.go +++ b/tests/framework/integration.go @@ -63,15 +63,32 @@ type integrationClient struct { *clientv3.Client } -func (c integrationClient) Get(key string, opts ...testutils.GetOption) (*clientv3.GetResponse, error) { - o := testutils.GetOptions{} - for _, opt := range opts { - opt(&o) - } +func (c integrationClient) Get(key string, o testutils.GetOptions) (*clientv3.GetResponse, error) { clientOpts := []clientv3.OpOption{} + if o.Revision != 0 { + clientOpts = append(clientOpts, clientv3.WithRev(int64(o.Revision))) + } + if o.End != "" { + clientOpts = append(clientOpts, clientv3.WithRange(o.End)) + } if o.Serializable { clientOpts = append(clientOpts, clientv3.WithSerializable()) } + if o.Prefix { + clientOpts = append(clientOpts, clientv3.WithPrefix()) + } + if o.Limit != 0 { + clientOpts = append(clientOpts, clientv3.WithLimit(int64(o.Limit))) + } + if o.FromKey { + clientOpts = append(clientOpts, clientv3.WithFromKey()) + } + if o.CountOnly { + clientOpts = append(clientOpts, clientv3.WithCountOnly()) + } + if o.SortBy != clientv3.SortByKey || o.Order != clientv3.SortNone { + clientOpts = append(clientOpts, clientv3.WithSort(o.SortBy, o.Order)) + } return c.Client.Get(context.Background(), key, clientOpts...) } diff --git a/tests/framework/interface.go b/tests/framework/interface.go index 9eb9e34c2..b430106c6 100644 --- a/tests/framework/interface.go +++ b/tests/framework/interface.go @@ -34,5 +34,5 @@ type Cluster interface { type Client interface { Put(key, value string) error - Get(key string, opts ...testutils.GetOption) (*clientv3.GetResponse, error) + Get(key string, opts testutils.GetOptions) (*clientv3.GetResponse, error) } diff --git a/tests/framework/testutils/options.go b/tests/framework/testutils/options.go index 49cfb8d09..0ec7e56de 100644 --- a/tests/framework/testutils/options.go +++ b/tests/framework/testutils/options.go @@ -14,14 +14,16 @@ package testutils +import clientv3 "go.etcd.io/etcd/client/v3" + type GetOptions struct { + Revision int + End string + CountOnly bool Serializable bool -} - -type GetOption func(*GetOptions) - -func WithSerializable() GetOption { - return func(options *GetOptions) { - options.Serializable = true - } + Prefix bool + FromKey bool + Limit int + Order clientv3.SortOrder + SortBy clientv3.SortTarget } From 1c8adcd830c8006e23e21732601bd8e45783b48b Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Fri, 18 Feb 2022 12:46:59 +0100 Subject: [PATCH 2/7] tests: Handle simple TLS configuration for cluster in common framework --- tests/common/kv_test.go | 5 ++- .../options.go => config/client.go} | 2 +- tests/framework/config/cluster.go | 29 ++++++++++++++ tests/framework/e2e.go | 34 +++++++++++++++- tests/framework/e2e/etcdctl.go | 4 +- tests/framework/integration.go | 39 +++++++++++++++++-- tests/framework/interface.go | 6 +-- tests/framework/unit.go | 3 +- 8 files changed, 107 insertions(+), 15 deletions(-) rename tests/framework/{testutils/options.go => config/client.go} (97%) create mode 100644 tests/framework/config/cluster.go diff --git a/tests/common/kv_test.go b/tests/common/kv_test.go index 54bda9915..e2b6efc70 100644 --- a/tests/common/kv_test.go +++ b/tests/common/kv_test.go @@ -18,12 +18,13 @@ import ( "testing" "time" + "go.etcd.io/etcd/tests/v3/framework/config" "go.etcd.io/etcd/tests/v3/framework/testutils" ) func TestKVPut(t *testing.T) { testRunner.BeforeTest(t) - clus := testRunner.NewCluster(t) + clus := testRunner.NewCluster(t, config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS}) defer clus.Close() cc := clus.Client() @@ -33,7 +34,7 @@ func TestKVPut(t *testing.T) { if err := cc.Put(key, value); err != nil { t.Fatalf("count not put key %q, err: %s", key, err) } - resp, err := cc.Get(key, testutils.GetOptions{Serializable: true}) + resp, err := cc.Get(key, config.GetOptions{Serializable: true}) if err != nil { t.Fatalf("count not get key %q, err: %s", key, err) } diff --git a/tests/framework/testutils/options.go b/tests/framework/config/client.go similarity index 97% rename from tests/framework/testutils/options.go rename to tests/framework/config/client.go index 0ec7e56de..47c7ba138 100644 --- a/tests/framework/testutils/options.go +++ b/tests/framework/config/client.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package testutils +package config import clientv3 "go.etcd.io/etcd/client/v3" diff --git a/tests/framework/config/cluster.go b/tests/framework/config/cluster.go new file mode 100644 index 000000000..c9deab294 --- /dev/null +++ b/tests/framework/config/cluster.go @@ -0,0 +1,29 @@ +// Copyright 2022 The etcd Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +type TLSConfig string + +const ( + NoTLS TLSConfig = "" + AutoTLS TLSConfig = "auto-tls" + ManualTLS TLSConfig = "manual-tls" +) + +type ClusterConfig struct { + ClusterSize int + PeerTLS TLSConfig + ClientTLS TLSConfig +} diff --git a/tests/framework/e2e.go b/tests/framework/e2e.go index 7b7769ec9..d0e799163 100644 --- a/tests/framework/e2e.go +++ b/tests/framework/e2e.go @@ -19,6 +19,7 @@ import ( "testing" "go.etcd.io/etcd/client/pkg/v3/testutil" + "go.etcd.io/etcd/tests/v3/framework/config" "go.etcd.io/etcd/tests/v3/framework/e2e" ) @@ -37,8 +38,37 @@ func (e e2eRunner) BeforeTest(t testing.TB) { e2e.BeforeTest(t) } -func (e e2eRunner) NewCluster(t testing.TB) Cluster { - epc, err := e2e.NewEtcdProcessCluster(t, e2e.ConfigStandalone(*e2e.NewConfigAutoTLS())) +func (e e2eRunner) NewCluster(t testing.TB, cfg config.ClusterConfig) Cluster { + e2eConfig := e2e.EtcdProcessClusterConfig{ + InitialToken: "new", + ClusterSize: cfg.ClusterSize, + } + switch cfg.ClientTLS { + case config.NoTLS: + e2eConfig.ClientTLS = e2e.ClientNonTLS + case config.AutoTLS: + e2eConfig.IsClientAutoTLS = true + e2eConfig.ClientTLS = e2e.ClientTLS + case config.ManualTLS: + e2eConfig.IsClientAutoTLS = false + e2eConfig.ClientTLS = e2e.ClientTLS + default: + t.Fatalf("ClientTLS config %q not supported", cfg.ClientTLS) + } + switch cfg.PeerTLS { + case config.NoTLS: + e2eConfig.IsPeerTLS = false + e2eConfig.IsPeerAutoTLS = false + case config.AutoTLS: + e2eConfig.IsPeerTLS = true + e2eConfig.IsPeerAutoTLS = true + case config.ManualTLS: + e2eConfig.IsPeerTLS = true + e2eConfig.IsPeerAutoTLS = false + default: + t.Fatalf("PeerTLS config %q not supported", cfg.PeerTLS) + } + epc, err := e2e.NewEtcdProcessCluster(t, &e2eConfig) if err != nil { t.Fatalf("could not start etcd integrationCluster: %s", err) } diff --git a/tests/framework/e2e/etcdctl.go b/tests/framework/e2e/etcdctl.go index 90dd4856d..5d79bbfbb 100644 --- a/tests/framework/e2e/etcdctl.go +++ b/tests/framework/e2e/etcdctl.go @@ -20,7 +20,7 @@ import ( "strings" clientv3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/tests/v3/framework/testutils" + "go.etcd.io/etcd/tests/v3/framework/config" ) type EtcdctlV3 struct { @@ -39,7 +39,7 @@ func (ctl *EtcdctlV3) DowngradeEnable(version string) error { return SpawnWithExpect(ctl.cmdArgs("downgrade", "enable", version), "Downgrade enable success") } -func (ctl *EtcdctlV3) Get(key string, o testutils.GetOptions) (*clientv3.GetResponse, error) { +func (ctl *EtcdctlV3) Get(key string, o config.GetOptions) (*clientv3.GetResponse, error) { args := ctl.cmdArgs() if o.Serializable { args = append(args, "--consistency", "s") diff --git a/tests/framework/integration.go b/tests/framework/integration.go index c628d7080..d484fe580 100644 --- a/tests/framework/integration.go +++ b/tests/framework/integration.go @@ -16,12 +16,15 @@ package framework import ( "context" + "fmt" "testing" "go.etcd.io/etcd/client/pkg/v3/testutil" + "go.etcd.io/etcd/client/pkg/v3/transport" clientv3 "go.etcd.io/etcd/client/v3" + "go.etcd.io/etcd/tests/v3/framework/config" "go.etcd.io/etcd/tests/v3/framework/integration" - "go.etcd.io/etcd/tests/v3/framework/testutils" + "go.uber.org/zap" ) type integrationRunner struct{} @@ -34,13 +37,41 @@ func (e integrationRunner) BeforeTest(t testing.TB) { integration.BeforeTest(t) } -func (e integrationRunner) NewCluster(t testing.TB) Cluster { +func (e integrationRunner) NewCluster(t testing.TB, cfg config.ClusterConfig) Cluster { + var err error + var integrationCfg integration.ClusterConfig + integrationCfg.Size = cfg.ClusterSize + integrationCfg.ClientTLS, err = tlsInfo(t, cfg.ClientTLS) + if err != nil { + t.Fatalf("ClientTLS: %s", err) + } + integrationCfg.PeerTLS, err = tlsInfo(t, cfg.PeerTLS) + if err != nil { + t.Fatalf("PeerTLS: %s", err) + } return &integrationCluster{ - Cluster: integration.NewCluster(t, &integration.ClusterConfig{Size: 1}), + Cluster: integration.NewCluster(t, &integrationCfg), t: t, } } +func tlsInfo(t testing.TB, cfg config.TLSConfig) (*transport.TLSInfo, error) { + switch cfg { + case config.NoTLS: + return nil, nil + case config.AutoTLS: + tls, err := transport.SelfCert(zap.NewNop(), t.TempDir(), []string{"localhost"}, 1) + if err != nil { + return nil, fmt.Errorf("failed to generate cert: %s", err) + } + return &tls, nil + case config.ManualTLS: + return &integration.TestTLSInfo, nil + default: + return nil, fmt.Errorf("config %q not supported", cfg) + } +} + type integrationCluster struct { *integration.Cluster t testing.TB @@ -63,7 +94,7 @@ type integrationClient struct { *clientv3.Client } -func (c integrationClient) Get(key string, o testutils.GetOptions) (*clientv3.GetResponse, error) { +func (c integrationClient) Get(key string, o config.GetOptions) (*clientv3.GetResponse, error) { clientOpts := []clientv3.OpOption{} if o.Revision != 0 { clientOpts = append(clientOpts, clientv3.WithRev(int64(o.Revision))) diff --git a/tests/framework/interface.go b/tests/framework/interface.go index b430106c6..fb57b92ec 100644 --- a/tests/framework/interface.go +++ b/tests/framework/interface.go @@ -18,13 +18,13 @@ import ( "testing" clientv3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/tests/v3/framework/testutils" + "go.etcd.io/etcd/tests/v3/framework/config" ) type testRunner interface { TestMain(m *testing.M) BeforeTest(testing.TB) - NewCluster(testing.TB) Cluster + NewCluster(testing.TB, config.ClusterConfig) Cluster } type Cluster interface { @@ -34,5 +34,5 @@ type Cluster interface { type Client interface { Put(key, value string) error - Get(key string, opts testutils.GetOptions) (*clientv3.GetResponse, error) + Get(key string, opts config.GetOptions) (*clientv3.GetResponse, error) } diff --git a/tests/framework/unit.go b/tests/framework/unit.go index 231e0f7df..45b10ff41 100644 --- a/tests/framework/unit.go +++ b/tests/framework/unit.go @@ -21,6 +21,7 @@ import ( "testing" "go.etcd.io/etcd/client/pkg/v3/testutil" + "go.etcd.io/etcd/tests/v3/framework/config" ) type unitRunner struct{} @@ -38,7 +39,7 @@ func (e unitRunner) TestMain(m *testing.M) { func (e unitRunner) BeforeTest(t testing.TB) { } -func (e unitRunner) NewCluster(t testing.TB) Cluster { +func (e unitRunner) NewCluster(t testing.TB, cfg config.ClusterConfig) Cluster { testutil.SkipTestIfShortMode(t, "Cannot create clusters in --short tests") return nil } From 58c38089193cfb2a89d2a1154ffbe10724a39e6c Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Fri, 18 Feb 2022 12:48:56 +0100 Subject: [PATCH 3/7] tests: Handle multiple cluster configurations --- tests/common/kv_test.go | 57 +++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/tests/common/kv_test.go b/tests/common/kv_test.go index e2b6efc70..c8ef1d023 100644 --- a/tests/common/kv_test.go +++ b/tests/common/kv_test.go @@ -24,28 +24,41 @@ import ( func TestKVPut(t *testing.T) { testRunner.BeforeTest(t) - clus := testRunner.NewCluster(t, config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS}) - defer clus.Close() - cc := clus.Client() + tcs := []struct { + name string + config config.ClusterConfig + }{ + { + name: "PeerAutoTLS", + config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS}, + }, + } + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + clus := testRunner.NewCluster(t, tc.config) + defer clus.Close() + cc := clus.Client() - testutils.ExecuteWithTimeout(t, 10*time.Second, func() { - key, value := "foo", "bar" + testutils.ExecuteWithTimeout(t, 10*time.Second, func() { + key, value := "foo", "bar" - if err := cc.Put(key, value); err != nil { - t.Fatalf("count not put key %q, err: %s", key, err) - } - resp, err := cc.Get(key, config.GetOptions{Serializable: true}) - if err != nil { - t.Fatalf("count not get key %q, err: %s", key, err) - } - if len(resp.Kvs) != 1 { - t.Errorf("Unexpected lenth of response, got %d", len(resp.Kvs)) - } - if string(resp.Kvs[0].Key) != key { - t.Errorf("Unexpected key, want %q, got %q", key, resp.Kvs[0].Key) - } - if string(resp.Kvs[0].Value) != value { - t.Errorf("Unexpected value, want %q, got %q", value, resp.Kvs[0].Value) - } - }) + if err := cc.Put(key, value); err != nil { + t.Fatalf("count not put key %q, err: %s", key, err) + } + resp, err := cc.Get(key, config.GetOptions{Serializable: true}) + if err != nil { + t.Fatalf("count not get key %q, err: %s", key, err) + } + if len(resp.Kvs) != 1 { + t.Errorf("Unexpected lenth of response, got %d", len(resp.Kvs)) + } + if string(resp.Kvs[0].Key) != key { + t.Errorf("Unexpected key, want %q, got %q", key, resp.Kvs[0].Key) + } + if string(resp.Kvs[0].Value) != value { + t.Errorf("Unexpected value, want %q, got %q", value, resp.Kvs[0].Value) + } + }) + }) + } } From 81ef11ffb81395295acc2e8d7b7e86ca379c5271 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Fri, 18 Feb 2022 13:06:48 +0100 Subject: [PATCH 4/7] tests: Test different TLS configuration with TestKVPut --- tests/common/kv_test.go | 16 ++++++++++++++++ tests/e2e/ctl_v3_kv_test.go | 6 ------ tests/framework/integration/cluster.go | 15 ++++++++++++--- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/tests/common/kv_test.go b/tests/common/kv_test.go index c8ef1d023..0e2af0956 100644 --- a/tests/common/kv_test.go +++ b/tests/common/kv_test.go @@ -28,10 +28,26 @@ func TestKVPut(t *testing.T) { name string config config.ClusterConfig }{ + { + name: "NoTLS", + config: config.ClusterConfig{ClusterSize: 1}, + }, + { + name: "PeerTLS", + config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.ManualTLS}, + }, { name: "PeerAutoTLS", config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS}, }, + { + name: "ClientTLS", + config: config.ClusterConfig{ClusterSize: 1, ClientTLS: config.ManualTLS}, + }, + { + name: "ClientAutoTLS", + config: config.ClusterConfig{ClusterSize: 1, ClientTLS: config.AutoTLS}, + }, } for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { diff --git a/tests/e2e/ctl_v3_kv_test.go b/tests/e2e/ctl_v3_kv_test.go index d74434ab2..4c094d856 100644 --- a/tests/e2e/ctl_v3_kv_test.go +++ b/tests/e2e/ctl_v3_kv_test.go @@ -22,12 +22,6 @@ import ( "go.etcd.io/etcd/tests/v3/framework/e2e" ) -func TestCtlV3PutNoTLS(t *testing.T) { testCtl(t, putTest, withCfg(*e2e.NewConfigNoTLS())) } -func TestCtlV3PutClientTLS(t *testing.T) { testCtl(t, putTest, withCfg(*e2e.NewConfigClientTLS())) } -func TestCtlV3PutClientAutoTLS(t *testing.T) { - testCtl(t, putTest, withCfg(*e2e.NewConfigClientAutoTLS())) -} -func TestCtlV3PutPeerTLS(t *testing.T) { testCtl(t, putTest, withCfg(*e2e.NewConfigPeerTLS())) } func TestCtlV3PutTimeout(t *testing.T) { testCtl(t, putTest, withDialTimeout(0)) } func TestCtlV3PutClientTLSFlagByEnv(t *testing.T) { testCtl(t, putTest, withCfg(*e2e.NewConfigClientTLS()), withFlagByEnv()) diff --git a/tests/framework/integration/cluster.go b/tests/framework/integration/cluster.go index 3b5be315f..e5a6778d1 100644 --- a/tests/framework/integration/cluster.go +++ b/tests/framework/integration/cluster.go @@ -1387,9 +1387,18 @@ func (c *Cluster) ClusterClient() (client *clientv3.Client, err error) { endpoints = append(endpoints, m.GrpcURL) } cfg := clientv3.Config{ - Endpoints: endpoints, - DialTimeout: 5 * time.Second, - DialOptions: []grpc.DialOption{grpc.WithBlock()}, + Endpoints: endpoints, + DialTimeout: 5 * time.Second, + DialOptions: []grpc.DialOption{grpc.WithBlock()}, + MaxCallSendMsgSize: c.Cfg.ClientMaxCallSendMsgSize, + MaxCallRecvMsgSize: c.Cfg.ClientMaxCallRecvMsgSize, + } + if c.Cfg.ClientTLS != nil { + tls, err := c.Cfg.ClientTLS.ClientConfig() + if err != nil { + return nil, err + } + cfg.TLS = tls } c.clusterClient, err = newClientV3(cfg) if err != nil { From 74d77dbaaabb86946549dee756225850a72011bf Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Fri, 18 Feb 2022 14:23:51 +0100 Subject: [PATCH 5/7] tests: Migrate TestKVGet e2e test to common test framework --- tests/common/kv_test.go | 75 +++++++++++++++++++ tests/e2e/ctl_v3_kv_test.go | 7 -- .../testutils/{util.go => execute.go} | 0 tests/framework/testutils/kvs.go | 28 +++++++ 4 files changed, 103 insertions(+), 7 deletions(-) rename tests/framework/testutils/{util.go => execute.go} (100%) create mode 100644 tests/framework/testutils/kvs.go diff --git a/tests/common/kv_test.go b/tests/common/kv_test.go index 0e2af0956..a2c16f89f 100644 --- a/tests/common/kv_test.go +++ b/tests/common/kv_test.go @@ -18,6 +18,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/tests/v3/framework/config" "go.etcd.io/etcd/tests/v3/framework/testutils" ) @@ -78,3 +80,76 @@ func TestKVPut(t *testing.T) { }) } } + +func TestKVGet(t *testing.T) { + testRunner.BeforeTest(t) + tcs := []struct { + name string + config config.ClusterConfig + }{ + { + name: "NoTLS", + config: config.ClusterConfig{ClusterSize: 1}, + }, + { + name: "PeerTLS", + config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.ManualTLS}, + }, + { + name: "PeerAutoTLS", + config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS}, + }, + { + name: "ClientTLS", + config: config.ClusterConfig{ClusterSize: 1, ClientTLS: config.ManualTLS}, + }, + { + name: "ClientAutoTLS", + config: config.ClusterConfig{ClusterSize: 1, ClientTLS: config.AutoTLS}, + }, + } + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + clus := testRunner.NewCluster(t, tc.config) + defer clus.Close() + cc := clus.Client() + + testutils.ExecuteWithTimeout(t, 10*time.Second, func() { + var ( + kvs = []testutils.KeyValue{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}} + revkvs = []testutils.KeyValue{{"key3", "val3"}, {"key2", "val2"}, {"key1", "val1"}} + ) + for i := range kvs { + if err := cc.Put(kvs[i].Key, kvs[i].Value); err != nil { + t.Fatalf("count not put key %q, err: %s", kvs[i].Key, err) + } + } + tests := []struct { + key string + options config.GetOptions + + wkv []testutils.KeyValue + }{ + {key: "key1", wkv: []testutils.KeyValue{{"key1", "val1"}}}, + {key: "", options: config.GetOptions{Prefix: true}, wkv: kvs}, + {key: "", options: config.GetOptions{FromKey: true}, wkv: kvs}, + {key: "key", options: config.GetOptions{Prefix: true}, wkv: kvs}, + {key: "key", options: config.GetOptions{Prefix: true, Limit: 2}, wkv: kvs[:2]}, + {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortAscend, SortBy: clientv3.SortByModRevision}, wkv: kvs}, + {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortAscend, SortBy: clientv3.SortByVersion}, wkv: kvs}, + {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortNone, SortBy: clientv3.SortByCreateRevision}, wkv: kvs}, + {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortDescend, SortBy: clientv3.SortByCreateRevision}, wkv: revkvs}, + {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortDescend, SortBy: clientv3.SortByKey}, wkv: revkvs}, + } + for _, tt := range tests { + resp, err := cc.Get(tt.key, tt.options) + if err != nil { + t.Fatalf("count not get key %q, err: %s", tt.key[0], err) + } + kvs := testutils.FromGetResponse(resp) + assert.Equal(t, tt.wkv, kvs) + } + }) + }) + } +} diff --git a/tests/e2e/ctl_v3_kv_test.go b/tests/e2e/ctl_v3_kv_test.go index 4c094d856..4c902cae7 100644 --- a/tests/e2e/ctl_v3_kv_test.go +++ b/tests/e2e/ctl_v3_kv_test.go @@ -29,13 +29,6 @@ func TestCtlV3PutClientTLSFlagByEnv(t *testing.T) { func TestCtlV3PutIgnoreValue(t *testing.T) { testCtl(t, putTestIgnoreValue) } func TestCtlV3PutIgnoreLease(t *testing.T) { testCtl(t, putTestIgnoreLease) } -func TestCtlV3Get(t *testing.T) { testCtl(t, getTest) } -func TestCtlV3GetNoTLS(t *testing.T) { testCtl(t, getTest, withCfg(*e2e.NewConfigNoTLS())) } -func TestCtlV3GetClientTLS(t *testing.T) { testCtl(t, getTest, withCfg(*e2e.NewConfigClientTLS())) } -func TestCtlV3GetClientAutoTLS(t *testing.T) { - testCtl(t, getTest, withCfg(*e2e.NewConfigClientAutoTLS())) -} -func TestCtlV3GetPeerTLS(t *testing.T) { testCtl(t, getTest, withCfg(*e2e.NewConfigPeerTLS())) } func TestCtlV3GetTimeout(t *testing.T) { testCtl(t, getTest, withDialTimeout(0)) } func TestCtlV3GetQuorum(t *testing.T) { testCtl(t, getTest, withQuorum()) } diff --git a/tests/framework/testutils/util.go b/tests/framework/testutils/execute.go similarity index 100% rename from tests/framework/testutils/util.go rename to tests/framework/testutils/execute.go diff --git a/tests/framework/testutils/kvs.go b/tests/framework/testutils/kvs.go new file mode 100644 index 000000000..d61ab6742 --- /dev/null +++ b/tests/framework/testutils/kvs.go @@ -0,0 +1,28 @@ +// Copyright 2022 The etcd Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package testutils + +import clientv3 "go.etcd.io/etcd/client/v3" + +type KeyValue struct { + Key, Value string +} + +func FromGetResponse(resp *clientv3.GetResponse) (kvs []KeyValue) { + for _, kv := range resp.Kvs { + kvs = append(kvs, KeyValue{Key: string(kv.Key), Value: string(kv.Value)}) + } + return kvs +} From bd9f366f40ea1da55ee859acf283c5ab84c723f8 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Fri, 18 Feb 2022 15:15:35 +0100 Subject: [PATCH 6/7] tests: Migrate TestKVRange integration test to TestKVGet --- tests/common/kv_test.go | 48 +++-- .../testutils/{kvs.go => helpters.go} | 8 +- tests/integration/clientv3/kv_test.go | 168 ------------------ 3 files changed, 31 insertions(+), 193 deletions(-) rename tests/framework/testutils/{kvs.go => helpters.go} (78%) diff --git a/tests/common/kv_test.go b/tests/common/kv_test.go index a2c16f89f..2b69d7ba5 100644 --- a/tests/common/kv_test.go +++ b/tests/common/kv_test.go @@ -116,37 +116,47 @@ func TestKVGet(t *testing.T) { testutils.ExecuteWithTimeout(t, 10*time.Second, func() { var ( - kvs = []testutils.KeyValue{{"key1", "val1"}, {"key2", "val2"}, {"key3", "val3"}} - revkvs = []testutils.KeyValue{{"key3", "val3"}, {"key2", "val2"}, {"key1", "val1"}} + kvs = []string{"a", "b", "c", "c", "c", "foo", "foo/abc", "fop"} + wantKvs = []string{"a", "b", "c", "foo", "foo/abc", "fop"} + kvsByVersion = []string{"a", "b", "foo", "foo/abc", "fop", "c"} + reversedKvs = []string{"fop", "foo/abc", "foo", "c", "b", "a"} ) + for i := range kvs { - if err := cc.Put(kvs[i].Key, kvs[i].Value); err != nil { - t.Fatalf("count not put key %q, err: %s", kvs[i].Key, err) + if err := cc.Put(kvs[i], "bar"); err != nil { + t.Fatalf("count not put key %q, err: %s", kvs[i], err) } } tests := []struct { - key string + begin string + end string options config.GetOptions - wkv []testutils.KeyValue + wkv []string }{ - {key: "key1", wkv: []testutils.KeyValue{{"key1", "val1"}}}, - {key: "", options: config.GetOptions{Prefix: true}, wkv: kvs}, - {key: "", options: config.GetOptions{FromKey: true}, wkv: kvs}, - {key: "key", options: config.GetOptions{Prefix: true}, wkv: kvs}, - {key: "key", options: config.GetOptions{Prefix: true, Limit: 2}, wkv: kvs[:2]}, - {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortAscend, SortBy: clientv3.SortByModRevision}, wkv: kvs}, - {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortAscend, SortBy: clientv3.SortByVersion}, wkv: kvs}, - {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortNone, SortBy: clientv3.SortByCreateRevision}, wkv: kvs}, - {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortDescend, SortBy: clientv3.SortByCreateRevision}, wkv: revkvs}, - {key: "key", options: config.GetOptions{Prefix: true, Order: clientv3.SortDescend, SortBy: clientv3.SortByKey}, wkv: revkvs}, + {begin: "a", wkv: wantKvs[:1]}, + {begin: "a", options: config.GetOptions{Serializable: true}, wkv: wantKvs[:1]}, + {begin: "a", options: config.GetOptions{End: "c"}, wkv: wantKvs[:2]}, + {begin: "", options: config.GetOptions{Prefix: true}, wkv: wantKvs}, + {begin: "", options: config.GetOptions{FromKey: true}, wkv: wantKvs}, + {begin: "a", options: config.GetOptions{End: "x"}, wkv: wantKvs}, + {begin: "", options: config.GetOptions{Prefix: true, Revision: 4}, wkv: kvs[:3]}, + {begin: "a", options: config.GetOptions{CountOnly: true}, wkv: nil}, + {begin: "foo", options: config.GetOptions{Prefix: true}, wkv: []string{"foo", "foo/abc"}}, + {begin: "foo", options: config.GetOptions{FromKey: true}, wkv: []string{"foo", "foo/abc", "fop"}}, + {begin: "", options: config.GetOptions{Prefix: true, Limit: 2}, wkv: wantKvs[:2]}, + {begin: "", options: config.GetOptions{Prefix: true, Order: clientv3.SortAscend, SortBy: clientv3.SortByModRevision}, wkv: wantKvs}, + {begin: "", options: config.GetOptions{Prefix: true, Order: clientv3.SortAscend, SortBy: clientv3.SortByVersion}, wkv: kvsByVersion}, + {begin: "", options: config.GetOptions{Prefix: true, Order: clientv3.SortNone, SortBy: clientv3.SortByCreateRevision}, wkv: wantKvs}, + {begin: "", options: config.GetOptions{Prefix: true, Order: clientv3.SortDescend, SortBy: clientv3.SortByCreateRevision}, wkv: reversedKvs}, + {begin: "", options: config.GetOptions{Prefix: true, Order: clientv3.SortDescend, SortBy: clientv3.SortByKey}, wkv: reversedKvs}, } for _, tt := range tests { - resp, err := cc.Get(tt.key, tt.options) + resp, err := cc.Get(tt.begin, tt.options) if err != nil { - t.Fatalf("count not get key %q, err: %s", tt.key[0], err) + t.Fatalf("count not get key %q, err: %s", tt.begin, err) } - kvs := testutils.FromGetResponse(resp) + kvs := testutils.KeysFromGetResponse(resp) assert.Equal(t, tt.wkv, kvs) } }) diff --git a/tests/framework/testutils/kvs.go b/tests/framework/testutils/helpters.go similarity index 78% rename from tests/framework/testutils/kvs.go rename to tests/framework/testutils/helpters.go index d61ab6742..ecc165a86 100644 --- a/tests/framework/testutils/kvs.go +++ b/tests/framework/testutils/helpters.go @@ -16,13 +16,9 @@ package testutils import clientv3 "go.etcd.io/etcd/client/v3" -type KeyValue struct { - Key, Value string -} - -func FromGetResponse(resp *clientv3.GetResponse) (kvs []KeyValue) { +func KeysFromGetResponse(resp *clientv3.GetResponse) (kvs []string) { for _, kv := range resp.Kvs { - kvs = append(kvs, KeyValue{Key: string(kv.Key), Value: string(kv.Value)}) + kvs = append(kvs, string(kv.Key)) } return kvs } diff --git a/tests/integration/clientv3/kv_test.go b/tests/integration/clientv3/kv_test.go index fe0b5a2c4..9d164760c 100644 --- a/tests/integration/clientv3/kv_test.go +++ b/tests/integration/clientv3/kv_test.go @@ -254,180 +254,12 @@ func TestKVRange(t *testing.T) { wantSet []*mvccpb.KeyValue }{ - // range first two - { - "a", "c", - 0, - nil, - - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - }, - }, - // range first two with serializable - { - "a", "c", - 0, - []clientv3.OpOption{clientv3.WithSerializable()}, - - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - }, - }, - // range all with rev - { - "a", "x", - 2, - nil, - - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - }, - }, - // range all with countOnly - { - "a", "x", - 2, - []clientv3.OpOption{clientv3.WithCountOnly()}, - - nil, - }, - // range all with SortByKey, SortAscend - { - "a", "x", - 0, - []clientv3.OpOption{clientv3.WithSort(clientv3.SortByKey, clientv3.SortAscend)}, - - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - {Key: []byte("c"), Value: nil, CreateRevision: 4, ModRevision: 6, Version: 3}, - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - }, - }, - // range all with SortByKey, missing sorting order (ASCEND by default) - { - "a", "x", - 0, - []clientv3.OpOption{clientv3.WithSort(clientv3.SortByKey, clientv3.SortNone)}, - - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - {Key: []byte("c"), Value: nil, CreateRevision: 4, ModRevision: 6, Version: 3}, - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - }, - }, - // range all with SortByCreateRevision, SortDescend - { - "a", "x", - 0, - []clientv3.OpOption{clientv3.WithSort(clientv3.SortByCreateRevision, clientv3.SortDescend)}, - - []*mvccpb.KeyValue{ - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("c"), Value: nil, CreateRevision: 4, ModRevision: 6, Version: 3}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - }, - }, - // range all with SortByCreateRevision, missing sorting order (ASCEND by default) - { - "a", "x", - 0, - []clientv3.OpOption{clientv3.WithSort(clientv3.SortByCreateRevision, clientv3.SortNone)}, - - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - {Key: []byte("c"), Value: nil, CreateRevision: 4, ModRevision: 6, Version: 3}, - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - }, - }, - // range all with SortByModRevision, SortDescend - { - "a", "x", - 0, - []clientv3.OpOption{clientv3.WithSort(clientv3.SortByModRevision, clientv3.SortDescend)}, - - []*mvccpb.KeyValue{ - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("c"), Value: nil, CreateRevision: 4, ModRevision: 6, Version: 3}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - }, - }, - // WithPrefix - { - "foo", "", - 0, - []clientv3.OpOption{clientv3.WithPrefix()}, - - []*mvccpb.KeyValue{ - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - }, - }, - // WithFromKey - { - "fo", "", - 0, - []clientv3.OpOption{clientv3.WithFromKey()}, - - []*mvccpb.KeyValue{ - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - }, - }, // fetch entire keyspace using WithFromKey { "\x00", "", 0, []clientv3.OpOption{clientv3.WithFromKey(), clientv3.WithSort(clientv3.SortByKey, clientv3.SortAscend)}, - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - {Key: []byte("c"), Value: nil, CreateRevision: 4, ModRevision: 6, Version: 3}, - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - }, - }, - // fetch entire keyspace using WithPrefix - { - "", "", - 0, - []clientv3.OpOption{clientv3.WithPrefix(), clientv3.WithSort(clientv3.SortByKey, clientv3.SortAscend)}, - - []*mvccpb.KeyValue{ - {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, - {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, - {Key: []byte("c"), Value: nil, CreateRevision: 4, ModRevision: 6, Version: 3}, - {Key: []byte("foo"), Value: nil, CreateRevision: 7, ModRevision: 7, Version: 1}, - {Key: []byte("foo/abc"), Value: nil, CreateRevision: 8, ModRevision: 8, Version: 1}, - {Key: []byte("fop"), Value: nil, CreateRevision: 9, ModRevision: 9, Version: 1}, - }, - }, - // fetch keyspace with empty key using WithFromKey - { - "", "", - 0, - []clientv3.OpOption{clientv3.WithFromKey(), clientv3.WithSort(clientv3.SortByKey, clientv3.SortAscend)}, - []*mvccpb.KeyValue{ {Key: []byte("a"), Value: nil, CreateRevision: 2, ModRevision: 2, Version: 1}, {Key: []byte("b"), Value: nil, CreateRevision: 3, ModRevision: 3, Version: 1}, From 49e9cb5f53df0d8c97ea998b3a13bcbbd0ad0677 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Fri, 18 Feb 2022 15:20:55 +0100 Subject: [PATCH 7/7] tests: Test multi member cluster --- tests/common/kv_test.go | 8 ++++---- tests/e2e/ctl_v3_kv_test.go | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/common/kv_test.go b/tests/common/kv_test.go index 2b69d7ba5..68f3205b3 100644 --- a/tests/common/kv_test.go +++ b/tests/common/kv_test.go @@ -36,11 +36,11 @@ func TestKVPut(t *testing.T) { }, { name: "PeerTLS", - config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.ManualTLS}, + config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.ManualTLS}, }, { name: "PeerAutoTLS", - config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS}, + config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.AutoTLS}, }, { name: "ClientTLS", @@ -93,11 +93,11 @@ func TestKVGet(t *testing.T) { }, { name: "PeerTLS", - config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.ManualTLS}, + config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.ManualTLS}, }, { name: "PeerAutoTLS", - config: config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS}, + config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.AutoTLS}, }, { name: "ClientTLS", diff --git a/tests/e2e/ctl_v3_kv_test.go b/tests/e2e/ctl_v3_kv_test.go index 4c902cae7..ae83ee127 100644 --- a/tests/e2e/ctl_v3_kv_test.go +++ b/tests/e2e/ctl_v3_kv_test.go @@ -30,7 +30,6 @@ func TestCtlV3PutIgnoreValue(t *testing.T) { testCtl(t, putTestIgnoreValue) } func TestCtlV3PutIgnoreLease(t *testing.T) { testCtl(t, putTestIgnoreLease) } func TestCtlV3GetTimeout(t *testing.T) { testCtl(t, getTest, withDialTimeout(0)) } -func TestCtlV3GetQuorum(t *testing.T) { testCtl(t, getTest, withQuorum()) } func TestCtlV3GetFormat(t *testing.T) { testCtl(t, getFormatTest) } func TestCtlV3GetRev(t *testing.T) { testCtl(t, getRevTest) }