mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 18:41:59 -07:00
Fix config test (hostname check)
This commit is contained in:
parent
aa78fbb09d
commit
5528db9693
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -193,6 +194,7 @@ func TestNodeAddresses(t *testing.T) {
|
|||||||
</configuration>
|
</configuration>
|
||||||
`)
|
`)
|
||||||
|
|
||||||
|
name, _ := os.Hostname()
|
||||||
expected := []NodeConfiguration{
|
expected := []NodeConfiguration{
|
||||||
{
|
{
|
||||||
NodeID: "n1",
|
NodeID: "n1",
|
||||||
@ -208,6 +210,7 @@ func TestNodeAddresses(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
NodeID: "n4",
|
NodeID: "n4",
|
||||||
|
Name: name, // Set when auto created
|
||||||
Addresses: []string{"dynamic"},
|
Addresses: []string{"dynamic"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user