aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-11-07 16:42:52 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-11-07 20:53:19 +0100
commita4a371234215a7705f304875cc8af067bf3142af (patch)
tree53fe58c399908b0eb2206056ef82eb72d69c97c7 /tests
parent6c5f762596af9567afc4691beea212483fa7a07a (diff)
Refactor logging logic.
Also, introduce new option 'logger-prefix' to determine the prefix of each log line. Closes: #942725.
Diffstat (limited to 'tests')
-rw-r--r--tests/01-rename-exists-db/run2
-rw-r--r--tests/01-rename-exists-local/run2
-rw-r--r--tests/01-rename-exists-remote/run2
-rw-r--r--tests/03-sync-mailbox-list/run4
-rw-r--r--tests/05-repair/run6
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/01-rename-exists-db/run b/tests/01-rename-exists-db/run
index 29cb075..aad7c44 100644
--- a/tests/01-rename-exists-db/run
+++ b/tests/01-rename-exists-db/run
@@ -9,6 +9,6 @@ doveadm -u "local" mailbox delete "t.o"
doveadm -u "remote" mailbox delete "t\\o"
! interimap --rename "root.from" "t.o"
-xgrep -Fx 'database: ERROR: Mailbox t.o exists. Run `interimap --target=database --delete t.o` to delete.' <"$STDERR"
+xgrep -Fx 'database: ERROR: Mailbox t.o exists. Run `interimap --target=database --delete t.o` to delete.' <"$STDERR"
# vim: set filetype=sh :
diff --git a/tests/01-rename-exists-local/run b/tests/01-rename-exists-local/run
index 17d8fcc..d82a0a4 100644
--- a/tests/01-rename-exists-local/run
+++ b/tests/01-rename-exists-local/run
@@ -8,6 +8,6 @@ check_mailbox_list
doveadm -u "remote" mailbox delete "t\\o"
! interimap --rename "root.from" "t.o"
-xgrep -Fx 'local: ERROR: Mailbox t.o exists. Run `interimap --target=local --delete t.o` to delete.' <"$STDERR"
+xgrep -Fx 'local: ERROR: Mailbox t.o exists. Run `interimap --target=local --delete t.o` to delete.' <"$STDERR"
# vim: set filetype=sh :
diff --git a/tests/01-rename-exists-remote/run b/tests/01-rename-exists-remote/run
index c867a77..28af1fc 100644
--- a/tests/01-rename-exists-remote/run
+++ b/tests/01-rename-exists-remote/run
@@ -8,6 +8,6 @@ check_mailbox_list
doveadm -u "local" mailbox delete "t.o"
! interimap --rename "root.from" "t.o"
-xgrep -Fx 'remote: ERROR: Mailbox t\o exists. Run `interimap --target=remote --delete t.o` to delete.' <"$STDERR"
+xgrep -Fx 'remote: ERROR: Mailbox t\o exists. Run `interimap --target=remote --delete t.o` to delete.' <"$STDERR"
# vim: set filetype=sh :
diff --git a/tests/03-sync-mailbox-list/run b/tests/03-sync-mailbox-list/run
index e9fda06..b506204 100644
--- a/tests/03-sync-mailbox-list/run
+++ b/tests/03-sync-mailbox-list/run
@@ -24,7 +24,7 @@ check_mailbox_list -s
# delete a mailbox one server and verify that synchronization fails as it's still in the database
doveadm -u "remote" mailbox delete "foo~baz"
! interimap
-xgrep -Fx 'database: ERROR: Mailbox foo.baz exists. Run `interimap --target=database --delete foo.baz` to delete.' <"$STDERR"
+xgrep -Fx 'database: ERROR: Mailbox foo.baz exists. Run `interimap --target=database --delete foo.baz` to delete.' <"$STDERR"
interimap --target="database" --delete "foo.baz"
xgrep -Fx 'database: Removed mailbox foo.baz' <"$STDERR"
interimap # create again
@@ -33,7 +33,7 @@ xgrep -Fx 'remote: Created mailbox foo~baz' <"$STDERR"
doveadm -u "local" mailbox delete "foo.bar"
! interimap
-xgrep -Fx 'database: ERROR: Mailbox foo.bar exists. Run `interimap --target=database --delete foo.bar` to delete.' <"$STDERR"
+xgrep -Fx 'database: ERROR: Mailbox foo.bar exists. Run `interimap --target=database --delete foo.bar` to delete.' <"$STDERR"
interimap --target="database" --delete "foo.bar"
xgrep -Fx 'database: Removed mailbox foo.bar' <"$STDERR"
interimap
diff --git a/tests/05-repair/run b/tests/05-repair/run
index 15553e0..66f9ce9 100644
--- a/tests/05-repair/run
+++ b/tests/05-repair/run
@@ -77,10 +77,10 @@ xcgrep 5 '^WARNING: Conflicting flag update in foo\.bar ' <"$STDERR"
xcgrep 1 -E '^WARNING: Pair \(lUID,rUID\) = \([0-9]+,[0-9]+\) vanished from foo\.bar\. Repairing\.$' <"$STDERR"
# 6-1 (luid 2 <-> ruid 10 is gone from both)
-xcgrep 5 -E '^local\(foo\.bar\): WARNING: UID [0-9]+ disappeared\. Downloading remote UID [0-9]+ again\.$' <"$STDERR"
+xcgrep 5 -E '^local\(foo\.bar\): WARNING: UID [0-9]+ disappeared. Redownloading remote UID [0-9]+\.$' <"$STDERR"
# 6-1 (luid 2 <-> ruid 10 is gone from both)
-xcgrep 3 -E '^remote\(foo~bar\): WARNING: UID [0-9]+ disappeared\. Downloading local UID [0-9]+ again\.$' <"$STDERR"
+xcgrep 3 -E '^remote\(foo~bar\): WARNING: UID [0-9]+ disappeared. Redownloading local UID [0-9]+\.$' <"$STDERR"
xgrep -E '^local\(baz\): Removed 24 UID\(s\) ' <"$STDERR"
xgrep -E '^remote\(baz\): Removed 5 UID\(s\) ' <"$STDERR"
@@ -92,7 +92,7 @@ xgrep -E '^remote\(foo~bar\): Updated flags \(\\Answered \\Seen\) for UID 8$' <
xgrep -E '^remote\(foo~bar\): Updated flags \(\\Answered\) for UID 3,12,16$' <"$STDERR"
# luid 17
-xcgrep 1 -E '^remote\(foo~bar\): WARNING: No match for modified local UID [0-9]+\. Downloading again\.' <"$STDERR"
+xcgrep 1 -E '^remote\(foo~bar\): WARNING: No match for modified local UID [0-9]+. Redownloading\.' <"$STDERR"
xgrep -E '^local\(foo\.bar\): Added 5 UID\(s\) ' <"$STDERR"
xgrep -E '^remote\(foo~bar\): Added 4 UID\(s\) ' <"$STDERR"