diff --git a/config/config_test.go b/config/config_test.go index 34f5f7061..3367836cd 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -38,10 +38,10 @@ func TestNodeConfig(t *testing.T) { v1data := []byte(` - +
a
- +
b
@@ -54,20 +54,20 @@ func TestNodeConfig(t *testing.T) { v2data := []byte(` - - + + - +
a
- +
b
`) for i, data := range [][]byte{v1data, v2data} { - cfg, err := Load(bytes.NewReader(data), "node1") + cfg, err := Load(bytes.NewReader(data), "NODE1") if err != nil { t.Error(err) } @@ -76,23 +76,23 @@ func TestNodeConfig(t *testing.T) { { ID: "test", Directory: "~/Sync", - Nodes: []NodeConfiguration{{NodeID: "node1"}, {NodeID: "node2"}}, + Nodes: []NodeConfiguration{{NodeID: "NODE1"}, {NodeID: "NODE2"}}, ReadOnly: true, }, } expectedNodes := []NodeConfiguration{ { - NodeID: "node1", + NodeID: "NODE1", Name: "node one", Addresses: []string{"a"}, }, { - NodeID: "node2", + NodeID: "NODE2", Name: "node two", Addresses: []string{"b"}, }, } - expectedNodeIDs := []string{"node1", "node2"} + expectedNodeIDs := []string{"NODE1", "NODE2"} if cfg.Version != 2 { t.Errorf("%d: Incorrect version %d != 2", i, cfg.Version) @@ -200,25 +200,25 @@ func TestNodeAddresses(t *testing.T) { name, _ := os.Hostname() expected := []NodeConfiguration{ { - NodeID: "n1", + NodeID: "N1", Addresses: []string{"dynamic"}, }, { - NodeID: "n2", + NodeID: "N2", Addresses: []string{"dynamic"}, }, { - NodeID: "n3", + NodeID: "N3", Addresses: []string{"dynamic"}, }, { - NodeID: "n4", + NodeID: "N4", Name: name, // Set when auto created Addresses: []string{"dynamic"}, }, } - cfg, err := Load(bytes.NewReader(data), "n4") + cfg, err := Load(bytes.NewReader(data), "N4") if err != nil { t.Error(err) }