From fac24f01e0bb379fe3cae124a6d01124ba407f17 Mon Sep 17 00:00:00 2001 From: Jan Henning Thorsen Date: Fri, 15 Jan 2021 09:29:46 +0900 Subject: [PATCH] Fix unit test after 3b77039cf --- lib/Convos/Util.pm | 2 +- t/util-generate-cert.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Convos/Util.pm b/lib/Convos/Util.pm index 0b4177f06..0d855ffdf 100644 --- a/lib/Convos/Util.pm +++ b/lib/Convos/Util.pm @@ -72,7 +72,7 @@ sub generate_cert_p { warn "\$ $ENV{OPENSSL_BIN} @openssl\n" if DEBUG; return Mojo::IOLoop->subprocess->run_p(sub { open STDERR, '>', File::Spec->devnull; - local $!, $?; + local ($!, $?); system $ENV{OPENSSL_BIN} => @openssl; die "$ENV{OPENSSL_BIN} @openssl FAIL $? / $!" if $? or $!; return \%params; diff --git a/t/util-generate-cert.t b/t/util-generate-cert.t index d1d0b8b20..b5fdb974e 100644 --- a/t/util-generate-cert.t +++ b/t/util-generate-cert.t @@ -33,7 +33,7 @@ subtest 'generate with input' => sub { subtest 'test that defaults got set' => sub { is $ENV{OPENSSL_BITS}, 4096, "OPENSSL_BITS=$ENV{OPENSSL_BITS}"; - is $ENV{OPENSSL_COUNTRY}, '', "OPENSSL_COUNTRY=$ENV{OPENSSL_COUNTRY}"; + is $ENV{OPENSSL_COUNTRY}, 'NO', "OPENSSL_COUNTRY=$ENV{OPENSSL_COUNTRY}"; is $ENV{OPENSSL_DAYS}, 3650, "OPENSSL_DAYS=$ENV{OPENSSL_DAYS}"; is $ENV{OPENSSL_ORGANIZATION}, 'Convos', "OPENSSL_ORGANIZATION=$ENV{OPENSSL_ORGANIZATION}"; };