From 75ca1315d8390f31e1df13fd763b0d494e9c9eef Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 11 Jul 2014 17:43:28 -0700 Subject: Adjust ACL test for new SQLite autoincrement behavior Similar to server, the ID of the last ACL created may vary depending on whether SQLite reuses the last autoincrement key when the highest-numbered record is deleted. Accept either possibility. Change-Id: I2dd3b3cbbdf32931820ff799ca06f751c37a4cbd Reviewed-on: https://gerrit.stanford.edu/1518 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- perl/t/acl.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl') diff --git a/perl/t/acl.t b/perl/t/acl.t index 7265865..7f82259 100755 --- a/perl/t/acl.t +++ b/perl/t/acl.t @@ -3,7 +3,7 @@ # Tests for the wallet ACL API. # # Written by Russ Allbery -# Copyright 2007, 2008 +# Copyright 2007, 2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -223,7 +223,7 @@ $acl = eval { Wallet::ACL->create ('example', $schema, @trace) }; ok (defined ($acl), ' and creating another with the same name works'); is ($@, '', ' with no exceptions'); is ($acl->name, 'example', ' and the right name'); -is ($acl->id, 3, ' and a new ID'); +like ($acl->id, qr{\A[23]\z}, ' and an ID of 2 or 3'); # Clean up. $setup->destroy; -- cgit v1.2.3