use of com.thoughtworks.go.server.service.GoConfigService in project gocd by gocd.
the class RoleConfigUpdateCommandTest method setUp.
@Before
public void setUp() throws Exception {
currentUser = new Username("bob");
goConfigService = mock(GoConfigService.class);
cruiseConfig = GoConfigMother.defaultCruiseConfig();
}
use of com.thoughtworks.go.server.service.GoConfigService in project gocd by gocd.
the class GoPartialConfigTest method setUp.
@Before
public void setUp() {
serverHealthService = mock(ServerHealthService.class);
configPluginService = mock(GoConfigPluginService.class);
plugin = mock(PartialConfigProvider.class);
when(configPluginService.partialConfigProviderFor(any(ConfigRepoConfig.class))).thenReturn(plugin);
cruiseConfig = new BasicCruiseConfig();
configRepoConfig = new ConfigRepoConfig(new GitMaterialConfig("url"), "plugin");
cruiseConfig.setConfigRepos(new ConfigReposConfig(configRepoConfig));
cachedGoConfig = mock(CachedGoConfig.class);
when(cachedGoConfig.currentConfig()).thenReturn(cruiseConfig);
configWatchList = new GoConfigWatchList(cachedGoConfig);
repoConfigDataSource = new GoRepoConfigDataSource(configWatchList, configPluginService, serverHealthService);
cachedGoPartials = new CachedGoPartials(serverHealthService);
goConfigService = mock(GoConfigService.class);
serverHealthService = mock(ServerHealthService.class);
partialConfig = new GoPartialConfig(repoConfigDataSource, configWatchList, goConfigService, cachedGoPartials, serverHealthService);
}
use of com.thoughtworks.go.server.service.GoConfigService in project gocd by gocd.
the class LdapUserSearchTest method setUp.
@Before
public void setUp() {
goConfigService = mock(GoConfigService.class);
contextFactory = mock(SpringSecurityContextSource.class);
securityConfig = mock(SecurityConfig.class);
ldapTemplate = mock(LdapTemplate.class);
logger = mock(Logger.class);
ldapUserSearch = new LdapUserSearch(goConfigService, contextFactory, ldapTemplate, logger);
when(goConfigService.security()).thenReturn(securityConfig);
spy = spy(ldapUserSearch);
}
use of com.thoughtworks.go.server.service.GoConfigService in project gocd by gocd.
the class AgentsEntityConfigUpdateCommandTest method setUp.
@Before
public void setUp() throws Exception {
result = new HttpLocalizedOperationResult();
currentUser = new Username(new CaseInsensitiveString("user"));
cruiseConfig = new GoConfigMother().defaultCruiseConfig();
goConfigService = mock(GoConfigService.class);
agentInstances = mock(AgentInstances.class);
uuids = new ArrayList<>();
environmentsToAdd = new ArrayList<>();
environmentsToRemove = new ArrayList<>();
resourcesToAdd = new ArrayList<>();
resourcesToRemove = new ArrayList<>();
triState = TriState.TRUE;
when(goConfigService.getEnvironments()).thenReturn(cruiseConfig.getEnvironments());
}
use of com.thoughtworks.go.server.service.GoConfigService in project gocd by gocd.
the class ElasticAgentProfileUpdateCommandTest method setUp.
@Before
public void setUp() throws Exception {
currentUser = new Username("bob");
goConfigService = mock(GoConfigService.class);
cruiseConfig = GoConfigMother.defaultCruiseConfig();
}
Aggregations