[Rt-commit] rt branch, 4.4.1-releng, updated. rt-4.4.1rc2-1-g0bba58c

Shawn Moore shawn at bestpractical.com
Mon Jul 18 16:21:31 EDT 2016


The branch, 4.4.1-releng has been updated
       via  0bba58cfa361491dc0c43c66bf7a04fe2a7ab2b4 (commit)
      from  db69a36aeb56bffa1b2be7d607c6f45170291913 (commit)

Summary of changes:
 t/externalauth/ldap.t            | 5 +----
 t/externalauth/ldap_escaping.t   | 1 +
 t/externalauth/ldap_group.t      | 2 +-
 t/externalauth/ldap_privileged.t | 1 +
 t/externalauth/sessions.t        | 1 +
 t/externalauth/sqlite.t          | 1 +
 6 files changed, 6 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 0bba58cfa361491dc0c43c66bf7a04fe2a7ab2b4
Author: Alex Vandiver <alex at chmrr.net>
Date:   Sat Jul 2 03:33:34 2016 -0700

    In tests, call PostLoadCheck to enable Externalauth
    
    02b06597 made the ExternalAuth meta-setting automatically enabled via
    PostLoadCheck, and 8946b1b8 removed the code in tests that set it.
    Because of the bug fixed in 43c13180, however, the ExternalAuth flag
    was always enabled, making tests pass.
    
    Post-43c13180, the PostLoadCheck is never called after the ->Set calls
    inside a testfile.  As such, the ExternalAuth meta-setting is never
    enabled, and all external auth tests fail.
    
    Explicitly call ->PostLoadCheck after each block of
    ExternalAuth-related ->Set calls, to trigger the activation of the
    ExternalAuth meta-setting.  Calling each configuration's PostLoadCheck
    hook automatically after each ->Set would require careful adjustment
    of the order of ->Set calls, which might be surprising behavior, as
    ordering is not important in `RT_SiteConfig.pm`.

diff --git a/t/externalauth/ldap.t b/t/externalauth/ldap.t
index 34dcf83..ef48411 100644
--- a/t/externalauth/ldap.t
+++ b/t/externalauth/ldap.t
@@ -49,10 +49,7 @@ RT->Config->Set(
         },
     }
 );
-
-# print "sleeping... ";
-# sleep( 500 );
-# print "done\n";
+RT->Config->PostLoadCheck;
 
 my ( $baseurl, $m ) = RT::Test->started_ok();
 
diff --git a/t/externalauth/ldap_escaping.t b/t/externalauth/ldap_escaping.t
index 0442313..34cb2a6 100644
--- a/t/externalauth/ldap_escaping.t
+++ b/t/externalauth/ldap_escaping.t
@@ -72,6 +72,7 @@ RT->Config->Set(
         },
     }
 );
+RT->Config->PostLoadCheck;
 
 my ( $baseurl, $m ) = RT::Test->started_ok();
 
diff --git a/t/externalauth/ldap_group.t b/t/externalauth/ldap_group.t
index a3d87a8..ebeea97 100644
--- a/t/externalauth/ldap_group.t
+++ b/t/externalauth/ldap_group.t
@@ -55,7 +55,6 @@ $ldap->add(
     ],
 );
 
-#RT->Config->Set( Plugins                     => 'RT::Authen::ExternalAuth' );
 RT->Config->Set( ExternalAuthPriority        => ['My_LDAP'] );
 RT->Config->Set( ExternalInfoPriority        => ['My_LDAP'] );
 RT->Config->Set( AutoCreateNonExternalUsers  => 0 );
@@ -80,6 +79,7 @@ RT->Config->Set(
         },
     }
 );
+RT->Config->PostLoadCheck;
 
 my ( $baseurl, $m ) = RT::Test->started_ok();
 
diff --git a/t/externalauth/ldap_privileged.t b/t/externalauth/ldap_privileged.t
index fe5e05a..7acdcc5 100644
--- a/t/externalauth/ldap_privileged.t
+++ b/t/externalauth/ldap_privileged.t
@@ -47,6 +47,7 @@ RT->Config->Set(
         },
     }
 );
+RT->Config->PostLoadCheck;
 
 my ( $baseurl, $m ) = RT::Test->started_ok();
 
diff --git a/t/externalauth/sessions.t b/t/externalauth/sessions.t
index 9b3ec36..bb9416c 100644
--- a/t/externalauth/sessions.t
+++ b/t/externalauth/sessions.t
@@ -117,5 +117,6 @@ sub setup_auth_source {
             },
         }
     );
+    RT->Config->PostLoadCheck;
 }
 
diff --git a/t/externalauth/sqlite.t b/t/externalauth/sqlite.t
index 9e7c2cc..489aaef 100644
--- a/t/externalauth/sqlite.t
+++ b/t/externalauth/sqlite.t
@@ -56,6 +56,7 @@ RT->Config->Set(
         },
     }
 );
+RT->Config->PostLoadCheck;
 
 my ( $baseurl, $m ) = RT::Test->started_ok();
 

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


More information about the rt-commit mailing list