[Rt-commit] rt branch 5.0/update-smime-tests created. rt-5.0.2-52-g30d36806b7

BPS Git Server git at git.bestpractical.com
Fri Dec 17 20:24:36 UTC 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/update-smime-tests has been created
        at  30d36806b7070640192410c52b6200b689bdcca5 (commit)

- Log -----------------------------------------------------------------
commit 30d36806b7070640192410c52b6200b689bdcca5
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Dec 17 15:07:55 2021 -0500

    Recurse through t directories when running automated tests
    
    Without -r, prove runs only the first set of directories when
    testing, missing some tests deeper in the tree.

diff --git a/.github/workflows/github-action.yml b/.github/workflows/github-action.yml
index f706368ad6..52c49db4c0 100644
--- a/.github/workflows/github-action.yml
+++ b/.github/workflows/github-action.yml
@@ -29,7 +29,7 @@ jobs:
           docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=SQLite --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps"
       - name: Run RT tests
         shell: bash
-        run: docker exec -e RT_TEST_PARALLEL=1 rt bash -c "cd /rt && prove -lj6 t/*"
+        run: docker exec -e RT_TEST_PARALLEL=1 rt bash -c "cd /rt && prove -lrj6 t/*"
       - name: Get run time
         shell: bash
         run: |
@@ -85,7 +85,7 @@ jobs:
           RT_DBA_PASSWORD: password
           DB_VERSION_TAG: 10.3
         shell: bash
-        run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password rt bash -c "cd /rt && prove -lj6 t/*"
+        run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password rt bash -c "cd /rt && prove -lrj6 t/*"
       - name: Get run time
         shell: bash
         run: |
@@ -146,7 +146,7 @@ jobs:
           RT_TEST_APACHE: /usr/sbin/apache2
           RT_TEST_APACHE_MODULES: /usr/lib/apache2/modules
         shell: bash
-        run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -u rt-user rt bash -c "cd /rt && prove -lj6 t/*"
+        run: docker exec -e RT_TEST_PARALLEL=1 -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -u rt-user rt bash -c "cd /rt && prove -lrj6 t/*"
       - name: Get run time
         shell: bash
         run: |

commit 4aef25a6c773d00282df200c72057d9a9c83421d
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Dec 17 15:06:05 2021 -0500

    Move SMIME environment variable check to Crypt file
    
    This follows the existing pattern from GPG tests,
    puts the check in just one place, and centralizes all of
    the environment checks for crypt tests.

diff --git a/lib/RT/Test/Crypt.pm b/lib/RT/Test/Crypt.pm
index 62ccf33ed1..cc228ed6ee 100644
--- a/lib/RT/Test/Crypt.pm
+++ b/lib/RT/Test/Crypt.pm
@@ -80,6 +80,10 @@ sub import {
     }
 
     if ($args{SMIME}) {
+
+        RT::Test::plan( skip_all => 'Skipping tests that would download a CRL because RT_TEST_SMIME_REVOCATION environment variable not set to true.')
+            unless $ENV{RT_TEST_SMIME_REVOCATION};
+
         RT::Test::plan( skip_all => 'openssl executable is required.' )
             unless RT::Test->find_executable('openssl');
     }
diff --git a/t/crypt/smime/crl-check.t b/t/crypt/smime/crl-check.t
index 1cdd3e3f70..6f6a6ae334 100644
--- a/t/crypt/smime/crl-check.t
+++ b/t/crypt/smime/crl-check.t
@@ -23,10 +23,6 @@ if (!RT::Crypt::SMIME->SupportsCRLfile) {
     RT::Test::plan( skip_all => 'This version of openssl does not support the -CRLfile option');
 }
 
-if (!$ENV{RT_TEST_SMIME_REVOCATION}) {
-    RT::Test::plan( skip_all => 'Skipping tests that would download a CRL because RT_TEST_SMIME_REVOCATION environment variable not set to 1');
-}
-
 my $crt;
 {
     local $/;
diff --git a/t/crypt/smime/revoked.t b/t/crypt/smime/revoked.t
index ec6d6d26b4..cba97f4407 100644
--- a/t/crypt/smime/revoked.t
+++ b/t/crypt/smime/revoked.t
@@ -19,15 +19,10 @@ RT->Config->Set('SMIME', Enable => 1,
 
 RT::Test::Crypt->smime_import_key('revoked at example.com');
 
-
 if (!RT::Crypt::SMIME->SupportsCRLfile) {
     RT::Test::plan( skip_all => 'This version of openssl does not support the -CRLfile option');
 }
 
-if (!$ENV{RT_TEST_SMIME_REVOCATION}) {
-    RT::Test::plan( skip_all => 'Skipping tests that would download a CRL because RT_TEST_SMIME_REVOCATION environment variable not set to 1');
-}
-
 my $crt;
 {
     local $/;

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list