From da9baa17c397d2931456df04d7e2d70f6a042f93 Mon Sep 17 00:00:00 2001 From: huybrechts Date: Sun, 9 Aug 2009 20:05:02 +0000 Subject: [PATCH] fixed login() and getContextPath() when working with non-root context git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20576 71c3de6d-444a-0410-be80-ed276b4c234a --- .../src/main/java/org/jvnet/hudson/test/HudsonTestCase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java index 0139acce95..f2c7df694c 100644 --- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java +++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java @@ -157,7 +157,7 @@ public abstract class HudsonTestCase extends TestCase { protected Server server; /** - * Where in the {@link Server} is Hudson deploed? + * Where in the {@link Server} is Hudson deployed? */ protected String contextPath = "/"; @@ -822,7 +822,7 @@ public abstract class HudsonTestCase extends TestCase { * Logs in to Hudson. */ public WebClient login(String username, String password) throws Exception { - HtmlPage page = goTo("login"); + HtmlPage page = goTo("/login"); // page = (HtmlPage) page.getFirstAnchorByText("Login").click(); HtmlForm form = page.getFormByName("login"); @@ -928,7 +928,7 @@ public abstract class HudsonTestCase extends TestCase { * URL ends with '/'. */ public String getContextPath() { - return "http://localhost:"+localPort+contextPath; + return "http://localhost:"+localPort+contextPath+"/"; } /** -- GitLab