diff options
author | Russ Allbery <eagle@eyrie.org> | 2018-06-03 16:58:02 -0700 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2018-06-03 16:58:02 -0700 |
commit | edf31eba414d9a105791c076fb1444a78d210dff (patch) | |
tree | 2bac18fa3b71593e616061a0fbcbfdd6ab26a255 /perl/t | |
parent | 4b3f858ef567c0d12511e7fea2a56f08f2729635 (diff) | |
parent | 68c4b05c268cd6e358cc41c8feb44bc2c7fcb898 (diff) |
New upstream version 1.4
Diffstat (limited to 'perl/t')
29 files changed, 73 insertions, 57 deletions
diff --git a/perl/t/data/acl-command b/perl/t/data/acl-command index b7c3066..bdf106a 100755 --- a/perl/t/data/acl-command +++ b/perl/t/data/acl-command @@ -5,10 +5,9 @@ # failure, or reports an error based on whether the second argument is # success, failure, or error. # -# Written by Russ Allbery <eagle@eyrie.org> # Copyright 2016 Russ Allbery <eagle@eyrie.org> # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT set -e diff --git a/perl/t/docs/pod-spelling.t b/perl/t/docs/pod-spelling.t index 6debd42..94d7503 100755 --- a/perl/t/docs/pod-spelling.t +++ b/perl/t/docs/pod-spelling.t @@ -3,10 +3,10 @@ # Check for spelling errors in POD documentation. # # The canonical version of this file is maintained in the rra-c-util package, -# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. +# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2013, 2014 +# Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # # Permission is hereby granted, free of charge, to any person obtaining a @@ -26,6 +26,8 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +# +# SPDX-License-Identifier: MIT use 5.006; use strict; diff --git a/perl/t/docs/pod.t b/perl/t/docs/pod.t index 674ce30..5fcfcdf 100755 --- a/perl/t/docs/pod.t +++ b/perl/t/docs/pod.t @@ -3,10 +3,10 @@ # Check all POD documents for POD formatting errors. # # The canonical version of this file is maintained in the rra-c-util package, -# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. +# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2012, 2013, 2014 +# Copyright 2012-2014 # The Board of Trustees of the Leland Stanford Junior University # # Permission is hereby granted, free of charge, to any person obtaining a @@ -26,6 +26,8 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +# +# SPDX-License-Identifier: MIT use 5.006; use strict; diff --git a/perl/t/general/acl.t b/perl/t/general/acl.t index 4de7493..c6e33f9 100755 --- a/perl/t/general/acl.t +++ b/perl/t/general/acl.t @@ -3,10 +3,10 @@ # Tests for the wallet ACL API. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2014 +# Copyright 2007-2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/general/admin.t b/perl/t/general/admin.t index 17671b6..a204558 100755 --- a/perl/t/general/admin.t +++ b/perl/t/general/admin.t @@ -3,10 +3,10 @@ # Tests for wallet administrative interface. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2008, 2009, 2010, 2011, 2013, 2014 +# Copyright 2008-2011, 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/general/config.t b/perl/t/general/config.t index bc200de..a0848ba 100755 --- a/perl/t/general/config.t +++ b/perl/t/general/config.t @@ -6,7 +6,7 @@ # Copyright 2008, 2010, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/general/init.t b/perl/t/general/init.t index 58b9a4c..ddc4aa1 100755 --- a/perl/t/general/init.t +++ b/perl/t/general/init.t @@ -3,10 +3,10 @@ # Tests for database initialization. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2014 +# Copyright 2007-2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/general/report.t b/perl/t/general/report.t index e47cdc6..8b491f5 100755 --- a/perl/t/general/report.t +++ b/perl/t/general/report.t @@ -3,10 +3,10 @@ # Tests for the wallet reporting interface. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2008, 2009, 2010, 2014 +# Copyright 2008-2010, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/general/server.t b/perl/t/general/server.t index 8f4c16c..0794f15 100755 --- a/perl/t/general/server.t +++ b/perl/t/general/server.t @@ -3,10 +3,10 @@ # Tests for the wallet server API. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2010, 2011, 2012, 2013, 2014 +# Copyright 2007-2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/lib/Util.pm b/perl/t/lib/Util.pm index 187e483..c583373 100644 --- a/perl/t/lib/Util.pm +++ b/perl/t/lib/Util.pm @@ -1,10 +1,10 @@ # Utility class for wallet tests. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2014 +# Copyright 2007-2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT package Util; require 5.006; diff --git a/perl/t/object/base.t b/perl/t/object/base.t index 8fedd64..2126ebf 100755 --- a/perl/t/object/base.t +++ b/perl/t/object/base.t @@ -3,10 +3,10 @@ # Tests for the basic object implementation. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2011, 2014 +# Copyright 2007-2008, 2011, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/duo-ldap.t b/perl/t/object/duo-ldap.t index 8a00dbb..e2b5d5d 100644 --- a/perl/t/object/duo-ldap.t +++ b/perl/t/object/duo-ldap.t @@ -6,7 +6,7 @@ # Copyright 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/duo-pam.t b/perl/t/object/duo-pam.t index 047343e..f0c9e61 100644 --- a/perl/t/object/duo-pam.t +++ b/perl/t/object/duo-pam.t @@ -6,7 +6,7 @@ # Copyright 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/duo-radius.t b/perl/t/object/duo-radius.t index 55cbb9d..5532a68 100644 --- a/perl/t/object/duo-radius.t +++ b/perl/t/object/duo-radius.t @@ -6,7 +6,7 @@ # Copyright 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/duo-rdp.t b/perl/t/object/duo-rdp.t index 25060ac..52f0613 100644 --- a/perl/t/object/duo-rdp.t +++ b/perl/t/object/duo-rdp.t @@ -6,7 +6,7 @@ # Copyright 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/duo.t b/perl/t/object/duo.t index a975597..75b5834 100755 --- a/perl/t/object/duo.t +++ b/perl/t/object/duo.t @@ -6,7 +6,7 @@ # Copyright 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/file.t b/perl/t/object/file.t index b7f295a..80173cd 100755 --- a/perl/t/object/file.t +++ b/perl/t/object/file.t @@ -6,7 +6,7 @@ # Copyright 2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/keytab.t b/perl/t/object/keytab.t index 111b7d0..dfb96bd 100755 --- a/perl/t/object/keytab.t +++ b/perl/t/object/keytab.t @@ -3,10 +3,10 @@ # Tests for the keytab object implementation. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2009, 2010, 2013, 2014 +# Copyright 2007-2010, 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/password.t b/perl/t/object/password.t index 306d82b..72a818c 100644 --- a/perl/t/object/password.t +++ b/perl/t/object/password.t @@ -7,7 +7,7 @@ # Copyright 2015 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/object/wa-keyring.t b/perl/t/object/wa-keyring.t index 4a3bd48..aa38e9c 100755 --- a/perl/t/object/wa-keyring.t +++ b/perl/t/object/wa-keyring.t @@ -3,10 +3,10 @@ # Tests for the WebAuth keyring object implementation. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2013, 2014 +# Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/policy/stanford.t b/perl/t/policy/stanford.t index d2727c8..f7b2f16 100755 --- a/perl/t/policy/stanford.t +++ b/perl/t/policy/stanford.t @@ -7,10 +7,10 @@ # behavior at Stanford. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2013, 2014 +# Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use 5.008; use strict; diff --git a/perl/t/style/minimum-version.t b/perl/t/style/minimum-version.t index e4eeafd..7698c2b 100755 --- a/perl/t/style/minimum-version.t +++ b/perl/t/style/minimum-version.t @@ -3,10 +3,10 @@ # Check that too-new features of Perl are not being used. # # The canonical version of this file is maintained in the rra-c-util package, -# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. +# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2013, 2014 +# Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # # Permission is hereby granted, free of charge, to any person obtaining a @@ -26,6 +26,8 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +# +# SPDX-License-Identifier: MIT use 5.006; use strict; diff --git a/perl/t/style/strict.t b/perl/t/style/strict.t index 7137b15..a3d2a3e 100755 --- a/perl/t/style/strict.t +++ b/perl/t/style/strict.t @@ -3,10 +3,11 @@ # Test Perl code for strict, warnings, and syntax. # # The canonical version of this file is maintained in the rra-c-util package, -# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. +# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2013, 2014 +# Copyright 2016 Russ Allbery <eagle@eyrie.org> +# Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # # Permission is hereby granted, free of charge, to any person obtaining a @@ -26,6 +27,8 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +# +# SPDX-License-Identifier: MIT use 5.006; use strict; @@ -39,8 +42,9 @@ use Test::RRA qw(skip_unless_automated use_prereq); # Skip for normal user installs since this doesn't affect functionality. skip_unless_automated('Strictness tests'); -# Load prerequisite modules. -use_prereq('Test::Strict'); +# Load prerequisite modules. At least 0.25 is needed to recognize that having +# use 5.012 or later automatically implies use strict. +use_prereq('Test::Strict', '0.25'); # Test everything in the distribution directory except the Build and # Makefile.PL scripts generated by Module::Build. We also want to check use diff --git a/perl/t/util/kadmin.t b/perl/t/util/kadmin.t index db94780..60a4933 100755 --- a/perl/t/util/kadmin.t +++ b/perl/t/util/kadmin.t @@ -3,10 +3,10 @@ # Tests for the kadmin object implementation. # # Written by Jon Robertson <jonrober@stanford.edu> -# Copyright 2009, 2010, 2012, 2013, 2014 +# Copyright 2009-2010, 2012-2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/verifier/basic.t b/perl/t/verifier/basic.t index ce44d44..3ee71d6 100755 --- a/perl/t/verifier/basic.t +++ b/perl/t/verifier/basic.t @@ -3,10 +3,10 @@ # Tests for the basic wallet ACL verifiers. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2010, 2014 +# Copyright 2007-2008, 2010, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; @@ -46,9 +46,9 @@ is ($verifier->error, 'malformed krb5 ACL', ' and right error'); $verifier = Wallet::ACL::Krb5::Regex->new; isa_ok ($verifier, 'Wallet::ACL::Krb5::Regex', 'krb5-regex verifier'); -is ($verifier->check ('rra@stanford.edu', '.*@stanford\.edu\z'), 1, +is ($verifier->check ('thoron@stanford.edu', '.*@stanford\.edu\z'), 1, 'Simple check'); -is ($verifier->check ('rra@stanford.edu', '^a.*@stanford\.edu'), 0, +is ($verifier->check ('thoron@stanford.edu', '^a.*@stanford\.edu'), 0, 'Simple failure'); is ($verifier->error, undef, 'No error set'); is ($verifier->check (undef, '^rra@stanford\.edu\z'), undef, diff --git a/perl/t/verifier/external.t b/perl/t/verifier/external.t index d1438de..2b725bd 100755 --- a/perl/t/verifier/external.t +++ b/perl/t/verifier/external.t @@ -2,10 +2,9 @@ # # Tests for the external wallet ACL verifier. # -# Written by Russ Allbery <eagle@eyrie.org> # Copyright 2016 Russ Allbery <eagle@eyrie.org> # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/verifier/ldap-attr.t b/perl/t/verifier/ldap-attr.t index cff3b63..321822d 100755 --- a/perl/t/verifier/ldap-attr.t +++ b/perl/t/verifier/ldap-attr.t @@ -6,10 +6,11 @@ # access to the LDAP server and will be skipped in all other environments. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2012, 2013, 2014 +# Copyright 2018 Russ Allbery <eagle@eyrie.org> +# Copyright 2012-2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; @@ -17,11 +18,12 @@ use warnings; use Test::More; use lib 't/lib'; +use Test::RRA qw(skip_unless_author); use Util; -# Skip all spelling tests unless the maintainer environment variable is set. -plan skip_all => 'LDAP verifier tests only run for maintainer' - unless $ENV{RRA_MAINTAINER_TESTS}; +# This test requires a specific environment setup, so only run it for package +# maintainers. +skip_unless_author('LDAP verifier tests'); # Declare a plan. plan tests => 22; @@ -49,7 +51,7 @@ package main; # Determine the local principal. my $klist = `klist 2>&1` || ''; SKIP: { - skip "tests useful only with Stanford Kerberos tickets", 9 + skip "tests useful only with Stanford Kerberos tickets", 20 unless ($klist =~ /[Pp]rincipal: \S+\@stanford\.edu$/m); # Set up our configuration. diff --git a/perl/t/verifier/nested.t b/perl/t/verifier/nested.t index ec7ce40..a975ea3 100755 --- a/perl/t/verifier/nested.t +++ b/perl/t/verifier/nested.t @@ -6,7 +6,7 @@ # Copyright 2015 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; diff --git a/perl/t/verifier/netdb.t b/perl/t/verifier/netdb.t index 7048ef9..0f3e2d4 100755 --- a/perl/t/verifier/netdb.t +++ b/perl/t/verifier/netdb.t @@ -7,10 +7,11 @@ # environments. # # Written by Russ Allbery <eagle@eyrie.org> +# Copyright 2018 Russ Allbery <eagle@eyrie.org> # Copyright 2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT use strict; use warnings; @@ -20,11 +21,16 @@ use Test::More tests => 5; use Wallet::ACL::NetDB; use lib 't/lib'; +use Test::RRA qw(skip_unless_author); use Util; +# This test requires a specific environment setup, so only run it for package +# maintainers. +skip_unless_author('LDAP verifier tests'); + my $netdb = 'netdb-node-roles-rc.stanford.edu'; my $host = 'windlord.stanford.edu'; -my $user = 'rra@stanford.edu'; +my $user = 'jonrober@stanford.edu'; # Determine the local principal. my $klist = `klist 2>&1` || ''; |