diff options
author | Russ Allbery <eagle@eyrie.org> | 2014-07-11 17:43:28 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2014-07-11 19:02:34 -0700 |
commit | 75ca1315d8390f31e1df13fd763b0d494e9c9eef (patch) | |
tree | 0b6b9bae6a24588e28ce77a6cd3f4281665696c3 /perl/t/acl.t | |
parent | 9d53a06f609864b9e2be7887a5c4a686a180deee (diff) |
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 <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'perl/t/acl.t')
-rwxr-xr-x | perl/t/acl.t | 4 |
1 files changed, 2 insertions, 2 deletions
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 <eagle@eyrie.org> -# 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; |