Merge branch 'main' into v2
* main: fix(syncthing): ensure both config and data dirs exist at startup (fixes #10126) (#10127) fix(versioner): fix perms of created folders (fixes #9626) (#10105) refactor: use slices.Contains to simplify code (#10121)
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime/pprof"
|
||||
"slices"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -1254,10 +1255,8 @@ func TestAutoAcceptPausedWhenFolderConfigChanged(t *testing.T) {
|
||||
} else if fcfg.Path != idOther {
|
||||
t.Error("folder path changed")
|
||||
} else {
|
||||
for _, dev := range fcfg.DeviceIDs() {
|
||||
if dev == device1 {
|
||||
return
|
||||
}
|
||||
if slices.Contains(fcfg.DeviceIDs(), device1) {
|
||||
return
|
||||
}
|
||||
t.Error("device missing")
|
||||
}
|
||||
@@ -1303,10 +1302,8 @@ func TestAutoAcceptPausedWhenFolderConfigNotChanged(t *testing.T) {
|
||||
} else if fcfg.Path != idOther {
|
||||
t.Error("folder path changed")
|
||||
} else {
|
||||
for _, dev := range fcfg.DeviceIDs() {
|
||||
if dev == device1 {
|
||||
return
|
||||
}
|
||||
if slices.Contains(fcfg.DeviceIDs(), device1) {
|
||||
return
|
||||
}
|
||||
t.Error("device missing")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user