tests: Handle multiple cluster configurations
@@ -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)
}
})
+ })
+ }
}
