use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class AgentConfigServiceIntegrationTest method setup.
@Before
public void setup() throws Exception {
agentInstances = new AgentInstances(new AgentRuntimeStatus.ChangeListener() {
@Override
public void statusUpdateRequested(AgentRuntimeInfo runtimeInfo, AgentRuntimeStatus newStatus) {
}
});
configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
configHelper.onSetUp();
goConfigService.forceNotifyListeners();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class MingleConfigServiceIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
dbHelper.onSetUp();
configHelper = new GoConfigFileHelper(goConfigDao);
configHelper.onSetUp();
configHelper.addPipeline("bar", "stage", MaterialConfigsMother.defaultMaterialConfigs(), "build");
pipelineConfig = configHelper.addPipeline("foo", "stage", MaterialConfigsMother.defaultMaterialConfigs(), "build");
configHelper.addMingleConfigToPipeline("foo", new MingleConfig("https://some-tracking-tool:8443", "project-super-secret", "hello=world"));
CruiseConfig cruiseConfig = configHelper.load();
PipelineConfigs group = cruiseConfig.findGroup("defaultGroup");
group.setAuthorization(new Authorization(new ViewConfig(new AdminUser(new CaseInsensitiveString("authorized_user")))));
configHelper.writeConfigFile(cruiseConfig);
SecurityConfig securityConfig = new SecurityConfig(new LdapConfig(new GoCipher()), new PasswordFileConfig("/tmp/foo.passwd"), true);
securityConfig.adminsConfig().add(new AdminUser(new CaseInsensitiveString("admin")));
configHelper.addSecurity(securityConfig);
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class StageControllerIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
fixture = new PipelineWithMultipleStages(3, materialRepository, transactionTemplate);
this.configHelper = new GoConfigFileHelper();
configHelper.usingCruiseConfigDao(goConfigDao);
configHelper.onSetUp();
fixture.usingConfigHelper(configHelper).usingDbHelper(dbHelper).onSetUp();
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
request.addHeader("Confirm", "true");
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class TimeReportingTest method setup.
@Before
public void setup() throws Exception {
configHelper = new GoConfigFileHelper();
dbHelper.onSetUp();
configHelper.usingCruiseConfigDao(goConfigDao).initializeConfigFile();
configHelper.onSetUp();
goConfigService.forceNotifyListeners();
}
use of com.thoughtworks.go.util.GoConfigFileHelper in project gocd by gocd.
the class LdapConfigChangedListenerTest method setUp.
@Before
public void setUp() throws IOException {
helper = new GoConfigFileHelper();
helper.onSetUp();
}
Aggregations