@@ -56,21 +56,23 @@ func init() {
56
56
57
57
func TestMigrate (t * testing.T ) {
58
58
migrations := []struct {
59
- title string
60
- memberCount int
61
- startVersion string
62
- endVersion string
63
- protocol string
59
+ title string
60
+ memberCount int
61
+ startVersion string
62
+ endVersion string
63
+ protocol string
64
+ clientListenUrls string
64
65
}{
65
66
// upgrades
66
- {"v3-v3-up" , 1 , "3.0.17/etcd3" , "3.1.12/etcd3" , "https" },
67
- {"oldest-newest-up" , 1 , "3.0.17/etcd3" , "3.1.12/etcd3" , "https" },
67
+ {"v3-v3-up" , 1 , "3.0.17/etcd3" , "3.1.12/etcd3" , "https" , "" },
68
+ {"oldest-newest-up" , 1 , "3.0.17/etcd3" , "3.1.12/etcd3" , "https" , "" },
69
+ {"v3-v3-up-with-additional-client-url" , 1 , "3.0.17/etcd3" , "3.1.12/etcd3" , "https" , "http://127.0.0.1:2379,http://10.128.0.1:2379" },
68
70
69
71
// warning: v2->v3 ha upgrades not currently supported.
70
- {"ha-v3-v3-up" , 3 , "3.0.17/etcd3" , "3.1.12/etcd3" , "https" },
72
+ {"ha-v3-v3-up" , 3 , "3.0.17/etcd3" , "3.1.12/etcd3" , "https" , "" },
71
73
72
74
// downgrades
73
- {"v3-v3-down" , 1 , "3.1.12/etcd3" , "3.0.17/etcd3" , "https" },
75
+ {"v3-v3-down" , 1 , "3.1.12/etcd3" , "3.0.17/etcd3" , "https" , "" },
74
76
75
77
// warning: ha downgrades not yet supported.
76
78
}
@@ -80,7 +82,7 @@ func TestMigrate(t *testing.T) {
80
82
start := MustParseEtcdVersionPair (m .startVersion )
81
83
end := MustParseEtcdVersionPair (m .endVersion )
82
84
83
- testCfgs := clusterConfig (t , m .title , m .memberCount , m .protocol )
85
+ testCfgs := clusterConfig (t , m .title , m .memberCount , m .protocol , m . clientListenUrls )
84
86
85
87
servers := []* EtcdMigrateServer {}
86
88
for _ , cfg := range testCfgs {
@@ -217,7 +219,7 @@ func checkPermissions(t *testing.T, path string, expected os.FileMode) {
217
219
}
218
220
}
219
221
220
- func clusterConfig (t * testing.T , name string , memberCount int , protocol string ) []* EtcdMigrateCfg {
222
+ func clusterConfig (t * testing.T , name string , memberCount int , protocol string , clientListenUrls string ) []* EtcdMigrateCfg {
221
223
peers := []string {}
222
224
for i := 0 ; i < memberCount ; i ++ {
223
225
memberName := fmt .Sprintf ("%s-%d" , name , i )
@@ -243,6 +245,7 @@ func clusterConfig(t *testing.T, name string, memberCount int, protocol string)
243
245
port : uint64 (2379 + i * 10000 ),
244
246
peerListenUrls : peerURL ,
245
247
peerAdvertiseUrls : peerURL ,
248
+ clientListenUrls : clientListenUrls ,
246
249
etcdDataPrefix : "/registry" ,
247
250
ttlKeysDirectory : "/registry/events" ,
248
251
supportedVersions : testSupportedVersions ,
0 commit comments