mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
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
This commit is contained in:
1 parent
9d55900f8f
commit
da9baa17c3
1 file changed
+3
-3
@@ -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+"/";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user