changeset 21751:dc989aeb7299

lib-index: Fix test-mail-index-transaction-update It was broken with TZ=Australia/ACT. Fixing it seems too troublesome, so just use TZ=UTC during the test.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 26 Feb 2017 16:10:58 +0200
parents 2ce0a606fd23
children f3b6870d5ec4
files src/lib-index/test-mail-index-transaction-update.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/test-mail-index-transaction-update.c	Sun Feb 26 16:09:13 2017 +0200
+++ b/src/lib-index/test-mail-index-transaction-update.c	Sun Feb 26 16:10:58 2017 +0200
@@ -627,6 +627,10 @@
 
 	test_begin("mail index update day first uid");
 
+	/* daylight savings times were confusing these tests, so we'll now
+	   just assume that TZ=UTC */
+	test_assert(timezone == 0);
+
 	hdr.messages_count = 10;
 	t = mail_index_transaction_new();
 	t->view = t_new(struct mail_index_view, 1);
@@ -671,6 +675,8 @@
 		test_mail_index_update_day_first_uid,
 		NULL
 	};
+	/* daylight saving time confuses things */
+	putenv("TZ=UTC");
 	tzset();
 	return test_run(test_functions);
 }