提交 bceeee59 编写于 作者: K kohsuke

partial test case committed so that I can continue this from the office.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12315 71c3de6d-444a-0410-be80-ed276b4c234a
上级 fc3dbc2c
package hudson.scm;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Result;
import org.jvnet.hudson.test.Bug;
import org.jvnet.hudson.test.HudsonHomeLoader.CopyExisting;
import org.jvnet.hudson.test.HudsonTestCase;
import org.jvnet.hudson.test.recipes.PresetData;
import static org.jvnet.hudson.test.recipes.PresetData.DataSet.ANONYMOUS_READONLY;
import java.io.File;
/**
* @author Kohsuke Kawaguchi
*/
public class SubversionSCMTest extends HudsonTestCase {
@PresetData(ANONYMOUS_READONLY)
@Bug(-1) // TODO
public void testTaggingPermission() throws Exception {
// create a build
File svnRepo = new CopyExisting(getClass().getResource("/svn-repo.zip")).allocate();
FreeStyleProject p = createFreeStyleProject();
p.setScm(new SubversionSCM(
new String[]{"file://"+svnRepo+"/trunk/a"},
new String[]{null},
true, null
));
FreeStyleBuild b = p.scheduleBuild2(0).get();
System.out.println(b.getLog());
assertEquals(Result.SUCCESS,b.getResult());
SubversionTagAction action = b.getAction(SubversionTagAction.class);
assertFalse(b.hasPermission(action.getPermission()));
// TODO: test permission
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册