mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
Fix tests
This commit is contained in:
parent
9f4cd7716e
commit
afc917b582
@ -341,18 +341,13 @@ func TestDeviceRename(t *testing.T) {
|
|||||||
t.Errorf("Device already has a name")
|
t.Errorf("Device already has a name")
|
||||||
}
|
}
|
||||||
|
|
||||||
ccm.Options = []protocol.Option{
|
ccm.DeviceName = "tester"
|
||||||
{
|
|
||||||
Key: "name",
|
|
||||||
Value: "tester",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
m.ClusterConfig(device1, ccm)
|
m.ClusterConfig(device1, ccm)
|
||||||
if cfg.Devices()[device1].Name != "tester" {
|
if cfg.Devices()[device1].Name != "tester" {
|
||||||
t.Errorf("Device did not get a name")
|
t.Errorf("Device did not get a name")
|
||||||
}
|
}
|
||||||
|
|
||||||
ccm.Options[0].Value = "tester2"
|
ccm.DeviceName = "tester2"
|
||||||
m.ClusterConfig(device1, ccm)
|
m.ClusterConfig(device1, ccm)
|
||||||
if cfg.Devices()[device1].Name != "tester" {
|
if cfg.Devices()[device1].Name != "tester" {
|
||||||
t.Errorf("Device name got overwritten")
|
t.Errorf("Device name got overwritten")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user