Search in sources :

Example 6 with BasicEnvironmentConfig

use of com.thoughtworks.go.config.BasicEnvironmentConfig in project gocd by gocd.

the class EnvironmentsConfigTest method setUp.

@Before
public void setUp() throws Exception {
    configs = new EnvironmentsConfig();
    env = new BasicEnvironmentConfig(new CaseInsensitiveString("uat"));
    env.addPipeline(new CaseInsensitiveString("deployment"));
    env.addAgent("agent-one");
    configs.add(env);
}
Also used : BasicEnvironmentConfig(com.thoughtworks.go.config.BasicEnvironmentConfig) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString) EnvironmentsConfig(com.thoughtworks.go.config.EnvironmentsConfig) Before(org.junit.Before)

Example 7 with BasicEnvironmentConfig

use of com.thoughtworks.go.config.BasicEnvironmentConfig in project gocd by gocd.

the class UpdateEnvironmentCommandTest method setup.

@Before
public void setup() throws Exception {
    initMocks(this);
    currentUser = new Username(new CaseInsensitiveString("user"));
    cruiseConfig = new GoConfigMother().defaultCruiseConfig();
    oldEnvironmentName = new CaseInsensitiveString("Dev");
    newEnvironmentName = new CaseInsensitiveString("Test");
    oldEnvironmentConfig = new BasicEnvironmentConfig(oldEnvironmentName);
    newEnvironmentConfig = new BasicEnvironmentConfig(newEnvironmentName);
    result = new HttpLocalizedOperationResult();
    md5 = "md5";
    cruiseConfig.addEnvironment(oldEnvironmentConfig);
    actionFailed = LocalizedMessage.string("ENV_UPDATE_FAILED", oldEnvironmentConfig.name());
}
Also used : HttpLocalizedOperationResult(com.thoughtworks.go.server.service.result.HttpLocalizedOperationResult) Username(com.thoughtworks.go.server.domain.Username) BasicEnvironmentConfig(com.thoughtworks.go.config.BasicEnvironmentConfig) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString) GoConfigMother(com.thoughtworks.go.helper.GoConfigMother) Before(org.junit.Before)

Aggregations

BasicEnvironmentConfig (com.thoughtworks.go.config.BasicEnvironmentConfig)7 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)7 Before (org.junit.Before)4 GoConfigMother (com.thoughtworks.go.helper.GoConfigMother)3 Username (com.thoughtworks.go.server.domain.Username)3 HttpLocalizedOperationResult (com.thoughtworks.go.server.service.result.HttpLocalizedOperationResult)3 Test (org.junit.Test)2 EnvironmentsConfig (com.thoughtworks.go.config.EnvironmentsConfig)1 MergeEnvironmentConfig (com.thoughtworks.go.config.merge.MergeEnvironmentConfig)1 FileConfigOrigin (com.thoughtworks.go.config.remote.FileConfigOrigin)1 RepoConfigOrigin (com.thoughtworks.go.config.remote.RepoConfigOrigin)1