提交 e400bc7d 编写于 作者: K Kohsuke Kawaguchi

Working toward fixing regressions.

So far none of them are real regressions but just that I needed to update tets
上级 ddf391cf
......@@ -23,6 +23,7 @@
*/
package hudson.model;
import org.junit.Before;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
......@@ -42,6 +43,11 @@ public class MyViewTest {
@Rule
public JenkinsRule rule = new JenkinsRule();
@Before
public void setup() {
rule.jenkins.setSecurityRealm(rule.createDummySecurityRealm());
}
@Test
public void testContains() throws IOException, Exception{
......
......@@ -72,7 +72,8 @@ public class NodeTest {
@Before
public void before(){
addDynamicLabel = false;
notTake = false;
notTake = false;
j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
}
@Test
......@@ -209,6 +210,7 @@ public class NodeTest {
HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(false);
j.jenkins.setSecurityRealm(realm);
User user = User.get("John Smith");
SecurityContextHolder.getContext().setAuthentication(user.impersonate());
assertFalse("Current user should not have permission read.", node.hasPermission(Permission.READ));
auth.add(Computer.CONFIGURE, user.getId());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册