fix(ur): actually send usage report directly when enabled (#9736)
There was a bug that the unique ID was not set when reporting was enabled, and thus the reports where rejected by the server. The unique ID got set only on startup, so next time Syncthing restarted. This makes sure to set the unique ID when blank.
This commit is contained in:
@@ -305,6 +305,11 @@ func TestOverriddenValues(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if cfg.Options().URUniqueID == "" {
|
||||
t.Error("expected usage reporting unique ID to be set since usage reporting is enabled")
|
||||
}
|
||||
expected.URUniqueID = cfg.Options().URUniqueID // it's random
|
||||
|
||||
if diff, equal := messagediff.PrettyDiff(expected, cfg.Options()); !equal {
|
||||
t.Errorf("Overridden config differs. Diff:\n%s", diff)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user