mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
remove new cluster check
This commit is contained in:
parent
1a0195e07e
commit
8a311e5b76
@ -28,7 +28,6 @@ func (c *ServerConfig) Verify() error {
|
|||||||
return fmt.Errorf("could not find name %v in cluster!", c.Name)
|
return fmt.Errorf("could not find name %v in cluster!", c.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.ClusterState == ClusterStateValueNew {
|
|
||||||
// No identical IPs in the cluster peer list
|
// No identical IPs in the cluster peer list
|
||||||
urlMap := make(map[string]bool)
|
urlMap := make(map[string]bool)
|
||||||
for _, m := range *c.Cluster {
|
for _, m := range *c.Cluster {
|
||||||
@ -39,6 +38,5 @@ func (c *ServerConfig) Verify() error {
|
|||||||
urlMap[url] = true
|
urlMap[url] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,6 @@ func TestConfigVerify(t *testing.T) {
|
|||||||
cfg := ServerConfig{
|
cfg := ServerConfig{
|
||||||
Name: "node1",
|
Name: "node1",
|
||||||
Cluster: cluster,
|
Cluster: cluster,
|
||||||
ClusterState: ClusterStateValueNew,
|
|
||||||
}
|
}
|
||||||
err := cfg.Verify()
|
err := cfg.Verify()
|
||||||
if (err == nil) && tt.shouldError {
|
if (err == nil) && tt.shouldError {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user