use of com.thoughtworks.go.config.remote.FileConfigOrigin in project gocd by gocd.
the class MergePipelineConfigsTest method createEmpty.
@Override
protected PipelineConfigs createEmpty() {
BasicPipelineConfigs pipelineConfigs = new BasicPipelineConfigs();
pipelineConfigs.setOrigin(new FileConfigOrigin());
return new MergePipelineConfigs(pipelineConfigs);
}
use of com.thoughtworks.go.config.remote.FileConfigOrigin in project gocd by gocd.
the class MergePipelineConfigsTest method createWithPipeline.
@Override
protected PipelineConfigs createWithPipeline(PipelineConfig pipelineConfig) {
BasicPipelineConfigs pipelineConfigsLocal = new BasicPipelineConfigs(pipelineConfig);
pipelineConfigsLocal.setOrigin(new FileConfigOrigin());
BasicPipelineConfigs pipelineConfigsRemote = new BasicPipelineConfigs();
pipelineConfigsRemote.setOrigin(new RepoConfigOrigin());
return new MergePipelineConfigs(pipelineConfigsRemote, pipelineConfigsLocal);
}
use of com.thoughtworks.go.config.remote.FileConfigOrigin in project gocd by gocd.
the class MergePipelineConfigsTest method shouldReturnFilePartForGetLocalWhenHasRemoteAndFilePart.
@Test
public void shouldReturnFilePartForGetLocalWhenHasRemoteAndFilePart() {
BasicPipelineConfigs filePart = new BasicPipelineConfigs();
filePart.setOrigin(new FileConfigOrigin());
BasicPipelineConfigs secondPart = new BasicPipelineConfigs();
secondPart.setOrigin(new RepoConfigOrigin());
MergePipelineConfigs merge = new MergePipelineConfigs(filePart, secondPart);
assertThat(merge.getLocal(), Matchers.<PipelineConfigs>is(filePart));
}
use of com.thoughtworks.go.config.remote.FileConfigOrigin in project gocd by gocd.
the class MergePipelineConfigsTest method shouldReturnFirstEditablePartWhenExists.
@Test
public void shouldReturnFirstEditablePartWhenExists() {
PipelineConfig pipe1 = PipelineConfigMother.pipelineConfig("pipeline1");
BasicPipelineConfigs part1 = new BasicPipelineConfigs(pipe1);
part1.setOrigin(new FileConfigOrigin());
MergePipelineConfigs group = new MergePipelineConfigs(part1, new BasicPipelineConfigs());
assertThat(group.getFirstEditablePartOrNull(), Matchers.<PipelineConfigs>is(part1));
}
use of com.thoughtworks.go.config.remote.FileConfigOrigin in project gocd by gocd.
the class MergePipelineConfigsTest method createWithPipelines.
@Override
protected PipelineConfigs createWithPipelines(PipelineConfig first, PipelineConfig second) {
BasicPipelineConfigs pipelineConfigsLocal = new BasicPipelineConfigs(first, second);
pipelineConfigsLocal.setOrigin(new FileConfigOrigin());
BasicPipelineConfigs pipelineConfigsRemote = new BasicPipelineConfigs();
pipelineConfigsRemote.setOrigin(new RepoConfigOrigin());
return new MergePipelineConfigs(pipelineConfigsLocal, pipelineConfigsRemote);
}
Aggregations