code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
private void prepareAPipelineWithHistory() {
MaterialRevisions materialRevisions = new MaterialRevisions();
List<Modification> modifications = this.hgMaterial.latestModification(workingFolder, subprocessExecutionContext);
materialRevisions.addRevision(this.hgMaterial, modifications);
Bui... | /*.*")));
workingFolder = TempDirUtils.createTempDirectoryIn(tempDir, "workingFolder").toFile();
outputStreamConsumer = inMemoryConsumer();
mingleConfig = configHelper.addPipeline("cruise", STAGE_NAME, this.hgMaterial.config(), "unit", "functional");
}
@AfterEach
public void teardow... | prepareAPipelineWithHistory | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/service/BuildCauseProducerServiceIntegrationHgTest.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/service/BuildCauseProducerServiceIntegrationHgTest.java | Apache-2.0 |
private void checkInFiles(String... files) throws Exception {
for (String fileName : files) {
File file = new File(workingFolder, fileName);
file.getParentFile().mkdirs();
Files.writeString(file.toPath(), "bla", UTF_8);
hgMaterial.add(workingFolder, outputStreamCo... | /*.*")));
workingFolder = TempDirUtils.createTempDirectoryIn(tempDir, "workingFolder").toFile();
outputStreamConsumer = inMemoryConsumer();
mingleConfig = configHelper.addPipeline("cruise", STAGE_NAME, this.hgMaterial.config(), "unit", "functional");
}
@AfterEach
public void teardow... | checkInFiles | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/service/BuildCauseProducerServiceIntegrationHgTest.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/service/BuildCauseProducerServiceIntegrationHgTest.java | Apache-2.0 |
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse resp) throws IOException {
handleRequest(request, resp);
} | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | doGet | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse resp) throws IOException {
handleRequest(request, resp);
} | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | doPost | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
@Override
protected void doPut(HttpServletRequest request, HttpServletResponse resp) throws IOException {
handleRequest(request, resp);
} | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | doPut | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
private void handleRequest(HttpServletRequest request, HttpServletResponse resp) throws IOException {
try (PrintWriter writer = resp.getWriter()) {
Request req = (Request) request;
writer.write(req.getRequestURL().toString());
if (req.getQueryParameters() !=... | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | handleRequest | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
public void httpConnector(final int port) {
ServerConnector connector = connectorWithPort(port);
server.addConnector(connector);
} | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | httpConnector | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
private ServerConnector connectorWithPort(int port) {
ServerConnector http = new ServerConnector(server);
http.setPort(port);
http.setIdleTimeout(MAX_IDLE_TIME);
return http;
} | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | connectorWithPort | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
public synchronized void start() throws InterruptedException {
if (blocker != null)
throw new IllegalStateException("Aborting server start, it seems server is already running.");
blocker = new Thread(() -> {
try {
server.start();
} catch (Exception e)... | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | start | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
public synchronized void stop() {
if (blocker == null)
throw new IllegalStateException("Aborting server stop, it seems there is no server running.");
try {
server.stop();
blocker.interrupt();
blocker.join();
blocker = null;
} catch (Ex... | Understands test http server that is used to test http client code end-to-end
<p>
Flicked from https://github.com/test-load-balancer/tlb (pre http-components) e19d4911b089eeaf1a2c | stop | java | gocd/gocd | server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | https://github.com/gocd/gocd/blob/master/server/src/test-integration/java/com/thoughtworks/go/server/web/HttpTestUtil.java | Apache-2.0 |
public List<Modification> addPipelineToRepositoryAndPush(String fileName, PipelineConfig pipelineConfig) throws Exception {
File file = new File(baseDir, fileName);
partialConfigHelper.addFileWithPipeline(fileName, pipelineConfig);
return repo.addCommitPush(material, "added pipeline config", ba... | An scm repository that is a configuration repository. Helper for tests. | addPipelineToRepositoryAndPush | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/helper/ConfigTestRepo.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/helper/ConfigTestRepo.java | Apache-2.0 |
public List<Modification> addCodeToRepositoryAndPush(String fileName,String comment, String content) throws Exception {
File file = new File(baseDir, fileName);
partialConfigHelper.writeFileWithContent(fileName, content);
return repo.addCommitPush(material, comment, baseDir, file);
} | An scm repository that is a configuration repository. Helper for tests. | addCodeToRepositoryAndPush | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/helper/ConfigTestRepo.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/helper/ConfigTestRepo.java | Apache-2.0 |
public HgMaterial getMaterial() {
return material;
} | An scm repository that is a configuration repository. Helper for tests. | getMaterial | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/helper/ConfigTestRepo.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/helper/ConfigTestRepo.java | Apache-2.0 |
public void verify() {
ScheduledExecutorService execService = Executors.newScheduledThreadPool(noOfThreadsToUse);
Collection<Future<Optional<String>>> futures = new ArrayList<>(noOfThreadsToUse);
registerSpecifiedNumberOfAgents(execService, futures);
IntStream.iterate(0, i -> i + 1)
... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | verify | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
private void generateReport() {
try {
String logDir = System.getProperty("gocd.server.log.dir", "logs");
String results =
String.join(",", AgentPerformanceCommandResult.headers()) +
System.lineSeparator() +
AgentPerformanceComm... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | generateReport | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
private void registerSpecifiedNumberOfAgents(ScheduledExecutorService execService, Collection<Future<Optional<String>>> futures) {
IntStream.iterate(0, i -> i + 1)
.limit(noOfThreadsToUse)
.forEach(val -> {
RegisterAgentCommand registerAgentCmd = new RegisterA... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | registerSpecifiedNumberOfAgents | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
private void doAssertAgentAndItsAssociationInDBAndCache() {
Streams.stream(agentService.getAgentInstances())
.filter(agentInstance -> agentInstance.getUuid().startsWith("Perf-Test-Agent-"))
.forEach(agentInstance -> {
Agent agentInCache = agentInstance.getAgen... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | doAssertAgentAndItsAssociationInDBAndCache | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
private void bombIfMissingAgentKnownEnvAssociationInEnvCache(Agent agentInCache, Set<String> agentEnvsInEnvCache, HashSet<String> agentEnvsInDB) {
Set<String> difference = SetUtils.difference(agentEnvsInDB, agentEnvsInEnvCache);
HashSet<String> knownEnvNames = new HashSet<>(environmentConfigService.getE... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | bombIfMissingAgentKnownEnvAssociationInEnvCache | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
private void bombIfAgentEnvAssociationInDBAndEnvCacheAreDifferent(Agent agentInCache, Set<String> agentEnvsInDB, Set<String> agentEnvsInEnvCache) {
if (!agentEnvsInDB.containsAll(agentEnvsInEnvCache)) {
LOG.error("Throwing RuntimeException as verification of agent environments {} in db and environme... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | bombIfAgentEnvAssociationInDBAndEnvCacheAreDifferent | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
private void bombIfAgentInDBAndCacheAreDifferent(Agent agentInCache, Agent agentInDB) {
if (!agentInCache.equals(agentInDB)) {
LOG.error("Throwing RuntimeException as verification of agents {} in db and cache has failed.\nAgent in DB: {}\nAgent in cache: {}", agentInCache.getUuid(), agentInDB, agent... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | bombIfAgentInDBAndCacheAreDifferent | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
private void joinFutures(Collection<Future<Optional<String>>> futures) {
for (Future<Optional<String>> f : futures) {
try {
Optional<String> uuid = f.get();
uuid.orElseThrow(() -> new Exception("Operation Failed!"));
} catch (Exception e) {
... | A test component which helps in verifying multi-threaded scenarios related to agents
Usage: add the following line as a test. Make sure that the service objects passed are autowired ones.
new AgentPerformanceVerifier(agentService, agentDao, envConfigService, goConfigService, 10).verify(); | joinFutures | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/server/perf/AgentPerformanceVerifier.java | Apache-2.0 |
public <T> T deepClone(T config) {
return CLONER.deepClone(config);
} | Understands how to edit the cruise config file for testing | deepClone | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static GoConfigDao createTestingDao() {
SystemEnvironment systemEnvironment = new SystemEnvironment();
try {
MaintenanceModeService maintenanceModeService = new MaintenanceModeService(new TimeProvider(), systemEnvironment);
ServerHealthService serverHealthService = new Se... | Creates config dao that accesses single file | createTestingDao | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static GoConfigFileHelper usingEmptyConfigFileWithLicenseAllowsUnlimitedAgents() {
return new GoConfigFileHelper(ConfigFileFixture.DEFAULT_XML_WITH_UNLIMITED_AGENTS);
} | Creates config dao that accesses single file | usingEmptyConfigFileWithLicenseAllowsUnlimitedAgents | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
private static JobConfigs defaultBuildPlans(String... planNames) {
JobConfigs plans = new JobConfigs();
for (String name : planNames) {
plans.add(defaultBuildPlan(name));
}
return plans;
} | Creates config dao that accesses single file | defaultBuildPlans | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
private static JobConfig defaultBuildPlan(String name) {
JobConfig job = new JobConfig(new CaseInsensitiveString(name), new ResourceConfigs(), new ArtifactTypeConfigs());
job.addTask(new AntTask());
return job;
} | Creates config dao that accesses single file | defaultBuildPlan | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static CruiseConfig load(String content) {
try {
return new GoConfigFileHelper(content).currentConfig();
} catch (Exception e) {
throw new RuntimeException(e);
}
} | Creates config dao that accesses single file | load | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static EnvironmentVariablesConfig env(String name, String value) {
return EnvironmentVariablesConfigMother.env(name, value);
} | Creates config dao that accesses single file | env | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static EnvironmentVariablesConfig env(String[] names, String[] values) {
return EnvironmentVariablesConfigMother.env(names, values);
} | Creates config dao that accesses single file | env | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static void clearConfigVersions() throws IOException {
FileUtils.deleteDirectory(new SystemEnvironment().getConfigRepoDir());
} | Creates config dao that accesses single file | clearConfigVersions | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static void withServerIdImmutability(Runnable fn) {
try {
SystemEnvironment.enforceServerImmutability.set(true);
fn.run();
} finally {
SystemEnvironment.enforceServerImmutability.set(false);
}
} | Creates config dao that accesses single file | withServerIdImmutability | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public static Admin[] adminUsers(String... userNames) {
Admin[] result = new Admin[userNames.length];
for (int i = 0; i < userNames.length; i++) {
String userName = userNames[i];
result[i] = new AdminUser(new CaseInsensitiveString(userName));
}
... | Creates config dao that accesses single file | adminUsers | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public String getCurrentXml() throws IOException {
return Files.readString(this.configFile.toPath(), UTF_8);
} | Creates config dao that accesses single file | getCurrentXml | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void saveFullConfig(String configFileContent, boolean shouldMigrate) throws Exception {
if (shouldMigrate) {
configFileContent = ConfigMigrator.migrate(configFileContent);
}
ConfigElementImplementationRegistry registry = new ConfigElementImplementationRegistry();
new C... | Creates config dao that accesses single file | saveFullConfig | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public GoConfigDao getGoConfigDao() {
return goConfigDao;
} | Creates config dao that accesses single file | getGoConfigDao | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public CachedGoConfig getCachedGoConfig() {
return cachedGoConfig;
} | Creates config dao that accesses single file | getCachedGoConfig | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void setArtifactsDir(String artifactsDir) {
CruiseConfig cruiseConfig = loadForEdit();
cruiseConfig.server().setArtifactsDir(artifactsDir);
writeConfigFile(cruiseConfig);
} | Creates config dao that accesses single file | setArtifactsDir | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public GoConfigFileHelper usingCruiseConfigDao(GoConfigDao goConfigDao) {
assignFileDao(goConfigDao);
return this;
} | Creates config dao that accesses single file | usingCruiseConfigDao | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void writeXmlToConfigFile(String xml) {
try {
Files.writeString(configFile.toPath(), xml, UTF_8);
goConfigDao.forceReload();
} catch (Exception e) {
throw bomb("Error writing config file: " + configFile.getAbsolutePath(), e);
}
} | Creates config dao that accesses single file | writeXmlToConfigFile | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void onSetUp() throws IOException {
initializeConfigFile();
writeConfigFile(load());
originalConfigDir = sysEnv.getConfigDir();
File configDir = configFile.getParentFile();
sysEnv.setProperty(SystemEnvironment.CONFIG_DIR_PROPERTY, configDir.getAbsolutePath());
} | Creates config dao that accesses single file | onSetUp | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void onTearDown() {
if (originalConfigDir != null) {
sysEnv.setProperty(SystemEnvironment.CONFIG_DIR_PROPERTY, originalConfigDir);
}
FileUtils.deleteQuietly(configFile);
try {
saveFullConfig(originalXml, true);
} catch (RuntimeException e) {
... | Creates config dao that accesses single file | onTearDown | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName) {
return addPipeline(pipelineName, stageName, "unit", "functional");
} | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName, Subversion repository) {
return addPipeline(pipelineName, stageName, repository, "unit", "functional");
} | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName, String... buildNames) {
return addPipelineWithGroup(BasicPipelineConfigs.DEFAULT_GROUP, pipelineName, stageName, buildNames);
} | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineTemplateConfig addTemplate(String pipelineName, String stageName) {
return addTemplate(pipelineName, new Authorization(), stageName);
} | Creates config dao that accesses single file | addTemplate | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineTemplateConfig addTemplate(String templateName, String paramName, String stageName) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineTemplateConfig templateConfig = PipelineTemplateConfigMother.createTemplate(templateName, new Authorization(), StageConfigMother.stageConfigWithParams(s... | Creates config dao that accesses single file | addTemplate | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineTemplateConfig addTemplate(String pipelineName, Authorization authorization, String stageName) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineTemplateConfig templateConfig = PipelineTemplateConfigMother.createTemplate(pipelineName, authorization, StageConfigMother.manualStage(stageN... | Creates config dao that accesses single file | addTemplate | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineWithGroup(String groupName, String pipelineName, String stageName, String... buildNames) {
return addPipelineWithGroup(groupName, pipelineName, new SvnCommand(null, "svn:///user:pass@tmp/foo"), stageName, buildNames);
} | Creates config dao that accesses single file | addPipelineWithGroup | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineWithTemplate(String groupName, String pipelineName, String templateName) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = new PipelineConfig(new CaseInsensitiveString(pipelineName), MaterialConfigsMother.mockMaterialConfigs("svn:///user:pass@t... | Creates config dao that accesses single file | addPipelineWithTemplate | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineWithGroup(String groupName, String pipelineName, SvnCommand svnCommand, String stageName, String... buildNames) {
return addPipelineWithGroupAndTimer(groupName, pipelineName, new MaterialConfigs(MaterialConfigsMother.mockMaterialConfigs(svnCommand.getUrlForDisplay())), stageName... | Creates config dao that accesses single file | addPipelineWithGroup | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineWithGroup(String groupName, String pipelineName, MaterialConfigs materialConfigs, String stageName, String... buildNames) {
return addPipelineWithGroupAndTimer(groupName, pipelineName, materialConfigs, stageName, null, buildNames);
} | Creates config dao that accesses single file | addPipelineWithGroup | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineWithGroupAndTimer(String groupName, String pipelineName, MaterialConfigs materialConfigs, String stageName, TimerConfig timer, String... buildNames) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = goConfigMother.addPipelineWithGroupAndTimer(c... | Creates config dao that accesses single file | addPipelineWithGroupAndTimer | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String groupName, PipelineConfig pipelineConfig) {
CruiseConfig cruiseConfig = loadForEdit();
cruiseConfig.addPipeline(groupName, pipelineConfig);
writeConfigFile(cruiseConfig);
return pipelineConfig;
} | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addSecurityAuthConfig(SecurityAuthConfig securityAuthConfig) {
CruiseConfig config = loadForEdit();
config.server().security().securityAuthConfigs().add(securityAuthConfig);
writeConfigFile(config);
} | Creates config dao that accesses single file | addSecurityAuthConfig | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig updatePipeline(CaseInsensitiveString pipelineName, Updater<PipelineConfig> updater) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = cruiseConfig.getPipelineConfigByName(pipelineName);
updater.update(pipelineConfig);
writeConfigFile(cruis... | Creates config dao that accesses single file | updatePipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(PipelineConfig pipelineConfig) {
return addPipelineToGroup(pipelineConfig, "quux-group");
} | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineToGroup(PipelineConfig pipelineConfig, final String groupName) {
CruiseConfig cruiseConfig = loadForEdit();
cruiseConfig.addPipeline(groupName, pipelineConfig);
writeConfigFile(cruiseConfig);
return pipelineConfig;
} | Creates config dao that accesses single file | addPipelineToGroup | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineWithGroup(String groupName, String pipelineName, MaterialConfigs materialConfigs, TrackingTool trackingTool, String stageName, String... jobs) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = goConfigMother.addPipelineWithGroup(cruiseConfig, g... | Creates config dao that accesses single file | addPipelineWithGroup | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName, Subversion repository, String... buildNames) {
return addPipeline(pipelineName, stageName, svn(repository.getUrl().originalArgument(), repository.getUserName(), repository.getPassword(), repository.isCheckExternals()), buildNames);
} | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void updateArtifactRoot(String path) {
CruiseConfig cruiseConfig = loadForEdit();
cruiseConfig.server().updateArtifactRoot(path);
writeConfigFile(cruiseConfig);
} | Creates config dao that accesses single file | updateArtifactRoot | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName, Subversion repository, Filter filter, String... buildNames) {
return addPipeline(pipelineName, stageName, svn(repository.getUrl().originalArgument(), repository.getUserName(), repository.getPassword(), repository.isCheckExternals()), filte... | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName, MaterialConfig materialConfig, String... buildNames) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = goConfigMother.addPipeline(cruiseConfig, pipelineName, stageName, new MaterialConfigs(materialConfig)... | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName, MaterialConfig materialConfig, TrackingTool trackingTool, String... jobs) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = goConfigMother.addPipeline(cruiseConfig, pipelineName, stageName, new MaterialCo... | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipeline(String pipelineName, String stageName, MaterialConfigs materialConfigs, String... buildNames) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = goConfigMother.addPipeline(cruiseConfig, pipelineName, stageName, materialConfigs, buildNames);
... | Creates config dao that accesses single file | addPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addStageToPipeline(String pipelineName, String stageName) {
return addStageToPipeline(pipelineName, stageName, "unit");
} | Creates config dao that accesses single file | addStageToPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addStageToPipeline(String pipelineName, String stageName, String... buildNames) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = goConfigMother.addStageToPipeline(cruiseConfig, pipelineName, stageName,
buildNames);
writeConfigFile... | Creates config dao that accesses single file | addStageToPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addStageToPipeline(String pipelineName, StageConfig stageConfig) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString(pipelineName));
pipelineConfig.add(stageConfig);
writeConfigFile... | Creates config dao that accesses single file | addStageToPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addEnvironmentVariableToPipeline(String pipelineName, EnvironmentVariablesConfig envVars) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString(pipelineName));
pipelineConfig.setVariables(envVars);
... | Creates config dao that accesses single file | addEnvironmentVariableToPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addEnvironmentVariableToStage(String pipelineName, String stageName, EnvironmentVariablesConfig envVars) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString(pipelineName));
StageConfig stageConfig = ... | Creates config dao that accesses single file | addEnvironmentVariableToStage | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addEnvironmentVariableToJob(String pipelineName, String stageName, String jobName, EnvironmentVariablesConfig envVars) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString(pipelineName));
StageConfig ... | Creates config dao that accesses single file | addEnvironmentVariableToJob | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addStageToPipeline(String pipelineName, String stageName, int stageindex,
String... buildNames) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = goConfigMother.addStageToPipeline(
cruiseConfig,... | Creates config dao that accesses single file | addStageToPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public StageConfig removeStage(String pipelineName, String stageName) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfig pipelineConfig = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString(pipelineName));
StageConfig stageConfig = pipelineConfig.findBy(new CaseInsensitiveString... | Creates config dao that accesses single file | removeStage | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void removePipeline(String pipelineName) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfigs groups = removePipeline(pipelineName, cruiseConfig);
if (groups.isEmpty()) {
cruiseConfig.getGroups().remove(groups);
}
writeConfigFile(cruiseConfig);
} | Creates config dao that accesses single file | removePipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfigs removePipeline(String pipelineName, CruiseConfig cruiseConfig) {
String groupName = cruiseConfig.getGroups().findGroupNameByPipeline(new CaseInsensitiveString(pipelineName));
PipelineConfigs groups = cruiseConfig.getGroups().findGroup(groupName);
groups.remove(cruiseConfig... | Creates config dao that accesses single file | removePipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void replaceAllJobsInStage(String pipelineName, String stageName, JobConfig jobConfig) {
pushJobIntoStage(pipelineName, stageName, jobConfig);
} | Creates config dao that accesses single file | replaceAllJobsInStage | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig addPipelineWithInvalidMaterial(String pipelineName, String stageName) {
CruiseConfig cruiseConfig = loadForEdit();
StageConfig stageConfig = StageConfigMother.custom(stageName, defaultBuildPlans("buildName"));
PipelineConfig pipelineConfig = new PipelineConfig(new CaseInsen... | Creates config dao that accesses single file | addPipelineWithInvalidMaterial | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public CruiseConfig load() {
try {
goConfigDao.forceReload();
return deepClone(goConfigDao.loadForEditing());
} catch (Exception e) {
throw new RuntimeException(e);
}
} | Creates config dao that accesses single file | load | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public CruiseConfig loadForEdit() {
try {
goConfigDao.forceReload();
CruiseConfig cruiseConfig = deepClone(goConfigDao.loadForEditing());
cruiseConfig.initializeServer();
return cruiseConfig;
} catch (Exception e) {
throw new RuntimeException(e... | Creates config dao that accesses single file | loadForEdit | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public CruiseConfig currentConfig() {
return load();
} | Creates config dao that accesses single file | currentConfig | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addConfigRepo(ConfigRepoConfig configRepoConfig) {
CruiseConfig cruiseConfig = loadForEdit();
cruiseConfig.getConfigRepos().add(configRepoConfig);
writeConfigFile(cruiseConfig);
} | Creates config dao that accesses single file | addConfigRepo | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void setConfigRepos(ConfigReposConfig configRepos) {
CruiseConfig cruiseConfig = loadForEdit();
cruiseConfig.setConfigRepos(configRepos);
writeConfigFile(cruiseConfig);
} | Creates config dao that accesses single file | setConfigRepos | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void makeJobRunOnAllAgents(String pipeline, String stageName, String jobName) {
CruiseConfig cruiseConfig = currentConfig();
cruiseConfig.jobConfigByName(pipeline, stageName, jobName, true).setRunOnAllAgents(true);
writeConfigFile(cruiseConfig);
} | Creates config dao that accesses single file | makeJobRunOnAllAgents | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addSecurity(SecurityConfig securityConfig) {
CruiseConfig config = loadForEdit();
config.server().useSecurity(securityConfig);
writeConfigFile(config);
} | Creates config dao that accesses single file | addSecurity | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void turnOffSecurity() {
addSecurity(new SecurityConfig());
} | Creates config dao that accesses single file | turnOffSecurity | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void enableSecurity() {
addSecurityAuthConfig(new SecurityAuthConfig(UUID.randomUUID().toString(), "plugin_id"));
} | Creates config dao that accesses single file | enableSecurity | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addSecurityWithAdminConfig() {
enableSecurity();
addAdmins("admin1");
} | Creates config dao that accesses single file | addSecurityWithAdminConfig | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addMailHost(MailHost mailHost) {
CruiseConfig config = loadForEdit();
config.server().updateMailHost(mailHost);
writeConfigFile(config);
} | Creates config dao that accesses single file | addMailHost | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addRole(Role role) {
CruiseConfig config = loadForEdit();
config.server().security().addRole(role);
writeConfigFile(config);
} | Creates config dao that accesses single file | addRole | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void replaceMaterialWithHgRepoForPipeline(String pipelinename, String hgUrl) {
replaceMaterialForPipeline(pipelinename, MaterialConfigsMother.hgMaterialConfig(hgUrl));
} | Creates config dao that accesses single file | replaceMaterialWithHgRepoForPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig replaceMaterialForPipeline(String pipelinename, MaterialConfig materialConfig) {
return replaceMaterialConfigForPipeline(pipelinename, new MaterialConfigs(materialConfig));
} | Creates config dao that accesses single file | replaceMaterialForPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig replaceMaterialConfigForPipeline(String pipelinename, MaterialConfig materialConfig) {
return replaceMaterialConfigForPipeline(pipelinename, new MaterialConfigs(materialConfig));
} | Creates config dao that accesses single file | replaceMaterialConfigForPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public PipelineConfig setMaterialConfigForPipeline(String pipelinename, MaterialConfig... materialConfigs) {
return addMaterialConfigForPipeline(pipelinename, materialConfigs);
} | Creates config dao that accesses single file | setMaterialConfigForPipeline | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void requireApproval(String pipelineName, String stageName) {
CruiseConfig cruiseConfig = loadForEdit();
cruiseConfig.pipelineConfigByName(new CaseInsensitiveString(pipelineName)).findBy(new CaseInsensitiveString(stageName)).updateApproval(Approval.manualApproval());
writeConfigFile(cruis... | Creates config dao that accesses single file | requireApproval | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void setDependencyOn(PipelineConfig product, String pipelineName, String stageName) {
CruiseConfig cruiseConfig = loadForEdit();
goConfigMother.setDependencyOn(cruiseConfig, product, pipelineName, stageName);
writeConfigFile(cruiseConfig);
} | Creates config dao that accesses single file | setDependencyOn | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void writeConfigFile(CruiseConfig cruiseConfig) {
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
getXml(cruiseConfig, buffer);
saveFullConfig(buffer.toString(), false);
} catch (Exception e) {
throw bomb(e);
}
} | Creates config dao that accesses single file | writeConfigFile | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void getXml(CruiseConfig cruiseConfig, ByteArrayOutputStream buffer) throws Exception {
new MagicalGoConfigXmlWriter(new ConfigCache(), com.thoughtworks.go.util.ConfigElementImplementationRegistryMother.withNoPlugins()).write(cruiseConfig, buffer, false);
} | Creates config dao that accesses single file | getXml | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void configureStageAsManualApproval(String pipelineName, String stage) {
updateApproval(pipelineName, stage, Approval.manualApproval());
} | Creates config dao that accesses single file | configureStageAsManualApproval | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void configureStageAsManualApproval(String pipelineName, String stage, boolean allowOnlyOnSuccess) {
Approval manualApproval = Approval.manualApproval();
manualApproval.setAllowOnlyOnSuccess(allowOnlyOnSuccess);
updateApproval(pipelineName, stage, manualApproval);
} | Creates config dao that accesses single file | configureStageAsManualApproval | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addAuthorizedUserForStage(String pipelineName, String stageName, String... users) {
CaseInsensitiveString pipeline = new CaseInsensitiveString(pipelineName);
CaseInsensitiveString stage = new CaseInsensitiveString(stageName);
if (!currentConfig().stageConfigByName(pipeline, stage).g... | Creates config dao that accesses single file | addAuthorizedUserForStage | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
public void addAuthorizedUserForPipelineGroup(String user) {
CruiseConfig cruiseConfig = loadForEdit();
PipelineConfigs group = cruiseConfig.getGroups().first();
group.getAuthorization().getViewConfig().add(new AdminUser(new CaseInsensitiveString(user)));
writeConfigFile(cruiseConfig);
... | Creates config dao that accesses single file | addAuthorizedUserForPipelineGroup | java | gocd/gocd | server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | https://github.com/gocd/gocd/blob/master/server/src/test-shared/java/com/thoughtworks/go/util/GoConfigFileHelper.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.