(t *testing.T)
| 259 | } |
| 260 | |
| 261 | func TestOverriddenValues(t *testing.T) { |
| 262 | expected := OptionsConfiguration{ |
| 263 | RawListenAddresses: []string{"tcp://:23000"}, |
| 264 | RawGlobalAnnServers: []string{"udp4://syncthing.nym.se:22026"}, |
| 265 | GlobalAnnEnabled: false, |
| 266 | LocalAnnEnabled: false, |
| 267 | LocalAnnPort: 42123, |
| 268 | LocalAnnMCAddr: "quux:3232", |
| 269 | MaxSendKbps: 1234, |
| 270 | MaxRecvKbps: 2341, |
| 271 | ReconnectIntervalS: 6000, |
| 272 | RelaysEnabled: false, |
| 273 | RelayReconnectIntervalM: 20, |
| 274 | StartBrowser: false, |
| 275 | NATEnabled: false, |
| 276 | NATLeaseM: 90, |
| 277 | NATRenewalM: 15, |
| 278 | NATTimeoutS: 15, |
| 279 | AutoUpgradeIntervalH: 24, |
| 280 | KeepTemporariesH: 48, |
| 281 | CacheIgnoredFiles: true, |
| 282 | ProgressUpdateIntervalS: 10, |
| 283 | LimitBandwidthInLan: true, |
| 284 | MinHomeDiskFree: Size{5.2, "%"}, |
| 285 | URSeen: 8, |
| 286 | URAccepted: 4, |
| 287 | URURL: "https://localhost/newdata", |
| 288 | URInitialDelayS: 800, |
| 289 | URPostInsecurely: true, |
| 290 | ReleasesURL: "https://localhost/releases", |
| 291 | AlwaysLocalNets: []string{}, |
| 292 | OverwriteRemoteDevNames: true, |
| 293 | TempIndexMinBlocks: 100, |
| 294 | UnackedNotificationIDs: []string{"asdfasdf"}, |
| 295 | SetLowPriority: false, |
| 296 | CRURL: "https://localhost/newcrash", |
| 297 | CREnabled: false, |
| 298 | StunKeepaliveStartS: 9000, |
| 299 | StunKeepaliveMinS: 900, |
| 300 | RawStunServers: []string{"foo"}, |
| 301 | FeatureFlags: []string{"feature"}, |
| 302 | AuditEnabled: true, |
| 303 | AuditFile: "nggyu", |
| 304 | ConnectionPriorityTCPLAN: 40, |
| 305 | ConnectionPriorityQUICLAN: 45, |
| 306 | ConnectionPriorityTCPWAN: 50, |
| 307 | ConnectionPriorityQUICWAN: 55, |
| 308 | ConnectionPriorityRelay: 9000, |
| 309 | } |
| 310 | expectedPath := "/media/syncthing" |
| 311 | |
| 312 | os.Unsetenv("STNOUPGRADE") |
| 313 | cfg, cfgCancel, err := copyAndLoad(testFs, "overridenvalues.xml", device1) |
| 314 | defer cfgCancel() |
| 315 | if err != nil { |
| 316 | t.Error(err) |
| 317 | } |
| 318 |
nothing calls this directly
no test coverage detected