Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bestpractical/rt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Vandiver <alex@chmrr.net>2016-07-02 13:33:34 +0300
committerShawn M Moore <shawn@bestpractical.com>2016-07-18 23:20:17 +0300
commit0bba58cfa361491dc0c43c66bf7a04fe2a7ab2b4 (patch)
treef03ccf0a10d9d1a176d26e1738201da6aec11f6a
parentdb69a36aeb56bffa1b2be7d607c6f45170291913 (diff)
In tests, call PostLoadCheck to enable Externalauthrt-4.4.1
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`.
-rw-r--r--t/externalauth/ldap.t5
-rw-r--r--t/externalauth/ldap_escaping.t1
-rw-r--r--t/externalauth/ldap_group.t2
-rw-r--r--t/externalauth/ldap_privileged.t1
-rw-r--r--t/externalauth/sessions.t1
-rw-r--r--t/externalauth/sqlite.t1
6 files changed, 6 insertions, 5 deletions
diff --git a/t/externalauth/ldap.t b/t/externalauth/ldap.t
index 34dcf83d03..ef48411253 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 0442313da4..34cb2a607c 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 a3d87a8d88..ebeea9726e 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 fe5e05af91..7acdcc5ef4 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 9b3ec36297..bb9416c99a 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 9e7c2cc71e..489aaef7e7 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();