mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
The Hudson URL at least has to be reset for tests to work correctly.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11862 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
de91773826
commit
142dbff0dd
1 file changed
+3
@@ -13,6 +13,7 @@ import hudson.model.FreeStyleProject;
|
||||
import hudson.model.Hudson;
|
||||
import hudson.model.Item;
|
||||
import hudson.model.UpdateCenter;
|
||||
import hudson.tasks.Mailer;
|
||||
import junit.framework.TestCase;
|
||||
import org.jvnet.hudson.test.HudsonHomeLoader.CopyExisting;
|
||||
import org.jvnet.hudson.test.recipes.Recipe;
|
||||
@@ -101,8 +102,10 @@ public abstract class HudsonTestCase extends TestCase {
|
||||
hudson = newHudson();
|
||||
hudson.servletContext.setAttribute("app",hudson);
|
||||
hudson.servletContext.setAttribute("version","?");
|
||||
|
||||
// cause all the descriptors to reload.
|
||||
// ideally we'd like to reset them to properly emulate the behavior, but that's not possible.
|
||||
Mailer.DESCRIPTOR.setHudsonUrl(null);
|
||||
for( Descriptor d : Descriptor.ALL )
|
||||
d.load();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user