Search in sources :

Example 1 with PluggableTaskService

use of com.thoughtworks.go.server.service.tasks.PluggableTaskService in project gocd by gocd.

the class TemplateConfigServiceTest method setup.

@Before
public void setup() {
    goConfigService = mock(GoConfigService.class);
    securityService = mock(SecurityService.class);
    entityHashingService = mock(EntityHashingService.class);
    pluggableTaskService = mock(PluggableTaskService.class);
    service = new TemplateConfigService(goConfigService, securityService, entityHashingService, pluggableTaskService);
}
Also used : PluggableTaskService(com.thoughtworks.go.server.service.tasks.PluggableTaskService) TemplateConfigService(com.thoughtworks.go.server.service.TemplateConfigService) Before(org.junit.Before)

Example 2 with PluggableTaskService

use of com.thoughtworks.go.server.service.tasks.PluggableTaskService in project gocd by gocd.

the class PipelineConfigServiceTest method setUp.

@Before
public void setUp() throws Exception {
    PipelineConfigs configs = createGroup("group", "pipeline", "in_env");
    downstream(configs);
    cruiseConfig = new BasicCruiseConfig(configs);
    cruiseConfig.addEnvironment(environment("foo", "in_env"));
    PipelineConfig remotePipeline = PipelineConfigMother.pipelineConfig("remote");
    remotePipeline.setOrigin(new RepoConfigOrigin(new ConfigRepoConfig(new GitMaterialConfig("url"), "plugin"), "1234"));
    cruiseConfig.addPipeline("group", remotePipeline);
    goConfigService = mock(GoConfigService.class);
    securityService = mock(SecurityService.class);
    pluggableTaskService = mock(PluggableTaskService.class);
    when(goConfigService.getCurrentConfig()).thenReturn(cruiseConfig);
    when(goConfigService.cruiseConfig()).thenReturn(cruiseConfig);
    when(goConfigService.getConfigForEditing()).thenReturn(cruiseConfig);
    when(goConfigService.getMergedConfigForEditing()).thenReturn(cruiseConfig);
    when(goConfigService.getAllPipelineConfigs()).thenReturn(cruiseConfig.getAllPipelineConfigs());
    pipelineConfigService = new PipelineConfigService(goConfigService, securityService, pluggableTaskService, null);
}
Also used : ConfigRepoConfig(com.thoughtworks.go.config.remote.ConfigRepoConfig) GitMaterialConfig(com.thoughtworks.go.config.materials.git.GitMaterialConfig) RepoConfigOrigin(com.thoughtworks.go.config.remote.RepoConfigOrigin) PluggableTaskService(com.thoughtworks.go.server.service.tasks.PluggableTaskService) Before(org.junit.Before)

Aggregations

PluggableTaskService (com.thoughtworks.go.server.service.tasks.PluggableTaskService)2 Before (org.junit.Before)2 GitMaterialConfig (com.thoughtworks.go.config.materials.git.GitMaterialConfig)1 ConfigRepoConfig (com.thoughtworks.go.config.remote.ConfigRepoConfig)1 RepoConfigOrigin (com.thoughtworks.go.config.remote.RepoConfigOrigin)1 TemplateConfigService (com.thoughtworks.go.server.service.TemplateConfigService)1