[Rt-commit] rt branch, 4.4/test-config-dir, created. rt-4.4.1-93-gfadf6d4
Alex Vandiver
alexmv at bestpractical.com
Thu Jul 28 05:40:21 EDT 2016
The branch, 4.4/test-config-dir has been created
at fadf6d42733753ac597aa5c5265a45d206d201bd (commit)
- Log -----------------------------------------------------------------
commit fadf6d42733753ac597aa5c5265a45d206d201bd
Author: Alex Vandiver <alex at chmrr.net>
Date: Thu Jul 28 02:09:45 2016 -0700
Disable reading of RT_SiteConfig.d during tests
Tests override the RT_SiteConfig.pm file with their own contents;
however, they did not prevent loading of files from RT_SiteConfig.d.
Additionally, the RT_SiteConfig.d files are loaded after the core
RT_SiteConfig.pm.
As such, tests would fail if the installed RT directory contained
configuration settings (such as `LogToSTDERR`, or `WebPort`) which
conflicted with the values expected during the test.
Explicitly disable loading of the RT_SiteConfig.d directory, by
setting it to /dev/null during tests.
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 381c24b..ee47f58 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -363,6 +363,7 @@ END
print $config "\n1;\n";
$ENV{'RT_SITE_CONFIG'} = $tmp{'config'}{'RT'};
+ $ENV{'RT_SITE_CONFIG_DIR'} = '/dev/null';
close $config;
return $config;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list