use of com.thoughtworks.go.util.SystemEnvironment in project gocd by gocd.
the class CommandRepositoryInitializerIntegrationTest method setUp.
@Before
public void setUp() {
tempFiles = new TempFiles();
initializer = new CommandRepositoryInitializer(new SystemEnvironment(), new ZipUtil(), null);
}
use of com.thoughtworks.go.util.SystemEnvironment in project gocd by gocd.
the class JobInstanceLogTest method setUp.
@Before
public void setUp() {
context = new Mockery();
context.setImposteriser(ClassImposteriser.INSTANCE);
jobInstanceLog = new JobInstanceLog(null, new HashMap());
defaultLogFile = new LogFile(new File("log20051209122103.xml"));
rootFolder = new File("root");
rootFolder.mkdirs();
env = new SystemEnvironment();
}
use of com.thoughtworks.go.util.SystemEnvironment in project gocd by gocd.
the class DevelopmentServer method copyActivatorJarToClassPath.
private static void copyActivatorJarToClassPath() throws IOException {
File activatorJar = new File("../plugin-infra/go-plugin-activator/target/libs/").listFiles((FileFilter) new WildcardFileFilter("go-plugin-activator-*.jar"))[0];
new SystemEnvironment().set(SystemEnvironment.PLUGIN_ACTIVATOR_JAR_PATH, "go-plugin-activator.jar");
if (activatorJar.exists()) {
FileUtils.copyFile(activatorJar, new File(classpath(), "go-plugin-activator.jar"));
} else {
System.err.println("Could not find plugin activator jar, Plugin framework will not be loaded.");
}
}
use of com.thoughtworks.go.util.SystemEnvironment in project gocd by gocd.
the class BackupServiceTest method setUp.
@Before
public void setUp() throws Exception {
systemEnvironment = mock(SystemEnvironment.class);
tempFiles = new TempFiles();
when(systemEnvironment.getConfigDir()).thenReturn(tempFiles.createUniqueFile("config_dir").getAbsolutePath());
serverVersion = mock(ServerVersion.class);
configRepo = mock(ConfigRepository.class);
databaseStrategy = mock(Database.class);
when(configRepo.doLocked(Matchers.<ThrowingFn<Object, Exception>>any())).thenCallRealMethod();
}
use of com.thoughtworks.go.util.SystemEnvironment in project gocd by gocd.
the class CommandRepositoryLocationValidatorTest method setUp.
@Before
public void setUp() throws Exception {
SystemEnvironment systemEnvironment = mock(SystemEnvironment.class);
validator = new CommandRepositoryLocationValidator(systemEnvironment);
cruiseConfig = mock(BasicCruiseConfig.class);
serverConfig = mock(ServerConfig.class);
when(cruiseConfig.server()).thenReturn(serverConfig);
when(systemEnvironment.get(COMMAND_REPOSITORY_DIRECTORY)).thenReturn("db/task_repository");
repoRootLocation = new File("db/task_repository").getAbsolutePath();
}
Aggregations