mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
20 lines
339 B
Go
20 lines
339 B
Go
package etcdhttp
|
|
|
|
import "testing"
|
|
|
|
//TODO: full testing for peer set
|
|
func TestPeerSet(t *testing.T) {
|
|
p := &Peers{}
|
|
tests := []string{
|
|
"1=1.1.1.1",
|
|
"2=2.2.2.2",
|
|
"1=1.1.1.1&1=1.1.1.2&2=2.2.2.2",
|
|
}
|
|
for i, tt := range tests {
|
|
p.Set(tt)
|
|
if p.String() != tt {
|
|
t.Errorf("#%d: string = %s, want %s", i, p.String(), tt)
|
|
}
|
|
}
|
|
}
|