提交 fe1d4472 编写于 作者: J Jesse Glick

Test SCM implementations now require an SCMDescriptor.

上级 65e87211
......@@ -33,6 +33,8 @@ import hudson.scm.ChangeLogParser;
import hudson.scm.ChangeLogSet;
import hudson.scm.ChangeLogSet.Entry;
import hudson.scm.NullSCM;
import hudson.scm.SCM;
import hudson.scm.SCMDescriptor;
import org.xml.sax.SAXException;
import java.io.File;
......@@ -74,6 +76,14 @@ public class FakeChangeLogSCM extends NullSCM {
return new FakeChangeLogParser();
}
@Override public SCMDescriptor<?> getDescriptor() {
return new SCMDescriptor<SCM>(null) {
@Override public String getDisplayName() {
return "";
}
};
}
public static class ChangelogAction extends InvisibleAction {
private final List<EntryImpl> entries;
......
......@@ -35,6 +35,8 @@ import hudson.tasks.Publisher
import hudson.tasks.Recorder;
import hudson.tasks.Shell;
import hudson.scm.NullSCM;
import hudson.scm.SCM
import hudson.scm.SCMDescriptor
import hudson.Launcher;
import hudson.FilePath;
import hudson.Functions;
......@@ -192,6 +194,13 @@ public class AbstractProjectTest extends HudsonTestCase {
@Override public boolean requiresWorkspaceForPolling() {
return true;
}
@Override public SCMDescriptor<?> getDescriptor() {
return new SCMDescriptor<SCM>(null) {
@Override public String getDisplayName() {
return "";
}
};
}
};
Thread t = new Thread() {
@Override public void run() {
......
......@@ -61,6 +61,7 @@ import hudson.FilePath;
import hudson.slaves.EnvironmentVariablesNodeProperty;
import hudson.EnvVars;
import hudson.model.labels.LabelAtom;
import hudson.scm.SCMDescriptor;
import hudson.slaves.Cloud;
import hudson.slaves.DumbSlave;
import hudson.slaves.NodeProvisioner;
......@@ -807,6 +808,13 @@ public class ProjectTest {
public boolean requiresWorkspaceForPolling(){
return true;
}
@Override public SCMDescriptor<?> getDescriptor() {
return new SCMDescriptor<SCM>(null) {
@Override public String getDisplayName() {
return "";
}
};
}
@Override
protected PollingResult compareRemoteRevisionWith(AbstractProject project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册