aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Frei <freisim93@gmail.com>2019-03-25 12:53:06 +0100
committerJakob Borg <jakob@kastelo.net>2019-03-25 12:53:06 +0100
commitbc53782f88f56150964f1dbaa83cb9177256fec5 (patch)
tree7ebf11b0831b0246e0e1b4e3e00800322b0df9dd /test
parente31a116e6ef0231f22ecf682d446f38ff13e90d8 (diff)
downloadsyncthing-bc53782f88f56150964f1dbaa83cb9177256fec5.tar.gz
syncthing-bc53782f88f56150964f1dbaa83cb9177256fec5.zip
test: Update conflict integration test (ref #5511) (#5618)
The change in 225c0dda805fbed69d745abce935130dcaf68763 (#5511) results in conflicts being immediately scanned and synced, while the test expects just one conflict on either side. Change it to expect the same conflict on both sides.
Diffstat (limited to 'test')
-rw-r--r--test/conflict_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/conflict_test.go b/test/conflict_test.go
index f44f818e7..bc4ae1f2f 100644
--- a/test/conflict_test.go
+++ b/test/conflict_test.go
@@ -133,8 +133,10 @@ func TestConflictsDefault(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if len(files) != 1 {
- t.Errorf("Expected 1 conflicted files instead of %d", len(files))
+ if len(files) != 2 {
+ t.Errorf("Expected 1 conflicted file on each side, instead of totally %d", len(files))
+ } else if filepath.Base(files[0]) != filepath.Base(files[1]) {
+ t.Errorf(`Expected same conflicted file on both sides, got "%v" and "%v"`, files[0], files[1])
}
log.Println("Introducing a conflict (edit plus delete)...")