aboutsummaryrefslogtreecommitdiffstats
path: root/tests/06-largeint
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-05-26 23:28:04 +0200
committerGuilhem Moulin <guilhem@fripost.org>2019-05-27 00:39:49 +0200
commit8e379c62a48d68cd5ab2a32c6fc9244b1ae94084 (patch)
treedd3656ac60fe10c1e1739a88350f77c2f2a417f9 /tests/06-largeint
parent456946609aa1e64a42578ff1c4962ea939d31da4 (diff)
Add test-suite (requires dovecot-imapd).
Diffstat (limited to 'tests/06-largeint')
-rw-r--r--tests/06-largeint/local.conf5
-rw-r--r--tests/06-largeint/remote.conf5
-rw-r--r--tests/06-largeint/run38
3 files changed, 48 insertions, 0 deletions
diff --git a/tests/06-largeint/local.conf b/tests/06-largeint/local.conf
new file mode 100644
index 0000000..9c838fd
--- /dev/null
+++ b/tests/06-largeint/local.conf
@@ -0,0 +1,5 @@
+namespace inbox {
+ location = maildir:~/inbox:LAYOUT=index
+ inbox = yes
+ list = yes
+}
diff --git a/tests/06-largeint/remote.conf b/tests/06-largeint/remote.conf
new file mode 100644
index 0000000..9c838fd
--- /dev/null
+++ b/tests/06-largeint/remote.conf
@@ -0,0 +1,5 @@
+namespace inbox {
+ location = maildir:~/inbox:LAYOUT=index
+ inbox = yes
+ list = yes
+}
diff --git a/tests/06-largeint/run b/tests/06-largeint/run
new file mode 100644
index 0000000..edcbd31
--- /dev/null
+++ b/tests/06-largeint/run
@@ -0,0 +1,38 @@
+doveadm -u "local" mailbox create "foo" "bar" "baz"
+doveadm -u "remote" mailbox create "foo" "bar" "baz"
+
+doveadm -u "local" mailbox update --uid-validity 1 "INBOX"
+doveadm -u "local" mailbox update --uid-validity 2147483647 "foo" # 2^31-1
+doveadm -u "local" mailbox update --uid-validity 2147483648 "bar" # 2^31
+doveadm -u "local" mailbox update --uid-validity 4294967295 "baz" # 2^32-1
+
+doveadm -u "remote" mailbox update --uid-validity 4294967295 "INBOX" # 2^32-1
+doveadm -u "remote" mailbox update --uid-validity 2147483648 "foo" # 2^31
+doveadm -u "remote" mailbox update --uid-validity 2147483647 "bar" # 2^31-1
+doveadm -u "remote" mailbox update --uid-validity 1 "baz" #
+
+run() {
+ local u m
+ for u in local remote; do
+ for m in "INBOX" "foo" "bar" "baz"; do
+ sample_message | deliver -u "$u" -- -m "$m"
+ done
+ done
+ interimap
+ check_mailbox_status "INBOX" "foo" "bar" "baz"
+}
+run
+
+# raise UIDNEXT AND HIGHESTMODSEQ close to the max values (resp. 2^32-1 och 2^63-1)
+doveadm -u "local" mailbox update --min-next-uid 2147483647 --min-highest-modseq 9223372036854775807 "INBOX" # 2^31-1, 2^63-1
+doveadm -u "local" mailbox update --min-next-uid 2147483647 --min-highest-modseq 9223372036854775807 "foo" # 2^31-1, 2^63-1
+doveadm -u "local" mailbox update --min-next-uid 2147483648 --min-highest-modseq 9223372036854775808 "bar" # 2^31, 2^63
+doveadm -u "local" mailbox update --min-next-uid 2147483648 --min-highest-modseq 9223372036854775808 "baz" # 2^31, 2^63
+
+doveadm -u "remote" mailbox update --min-next-uid 4294967168 --min-highest-modseq 18446744073709551488 "INBOX" # 2^32-128, 2^64-128
+doveadm -u "remote" mailbox update --min-next-uid 2147483776 --min-highest-modseq 9223372036854775936 "foo" # 2^31+128, 2^63+128
+doveadm -u "remote" mailbox update --min-next-uid 2147483648 --min-highest-modseq 9223372036854775808 "bar" # 2^31, 2^63
+
+run
+
+# vim: set filetype=sh :