mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Handle multiple cluster configurations
This commit is contained in:
parent
1c8adcd830
commit
58c3808919
@ -24,7 +24,18 @@ import (
|
|||||||
|
|
||||||
func TestKVPut(t *testing.T) {
|
func TestKVPut(t *testing.T) {
|
||||||
testRunner.BeforeTest(t)
|
testRunner.BeforeTest(t)
|
||||||
clus := testRunner.NewCluster(t, config.ClusterConfig{ClusterSize: 1, PeerTLS: config.AutoTLS})
|
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()
|
defer clus.Close()
|
||||||
cc := clus.Client()
|
cc := clus.Client()
|
||||||
|
|
||||||
@ -48,4 +59,6 @@ func TestKVPut(t *testing.T) {
|
|||||||
t.Errorf("Unexpected value, want %q, got %q", value, resp.Kvs[0].Value)
|
t.Errorf("Unexpected value, want %q, got %q", value, resp.Kvs[0].Value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user