tests: Handle multiple cluster configurations

This commit is contained in:
Marek Siarkowicz 2022-02-18 12:48:56 +01:00
parent 1c8adcd830
commit 58c3808919

View File

@ -24,7 +24,18 @@ import (
func TestKVPut(t *testing.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()
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)
}
})
})
}
}