mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
e2e: test etcd boots with unix peers
This commit is contained in:
@@ -84,3 +84,32 @@ func TestEtcdMultiPeer(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestEtcdUnixPeers checks that etcd will boot with unix socket peers.
|
||||
func TestEtcdUnixPeers(t *testing.T) {
|
||||
d, err := ioutil.TempDir("", "e1.etcd")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(d)
|
||||
proc, err := spawnCmd(
|
||||
[]string{
|
||||
binDir + "/etcd",
|
||||
"--data-dir", d,
|
||||
"--name", "e1",
|
||||
"--listen-peer-urls", "unix://etcd.unix:1",
|
||||
"--initial-advertise-peer-urls", "unix://etcd.unix:1",
|
||||
"--initial-cluster", "e1=unix://etcd.unix:1",
|
||||
},
|
||||
)
|
||||
defer os.Remove("etcd.unix:1")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err = waitReadyExpectProc(proc, etcdServerReadyLines); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err = proc.Stop(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user