use of com.cinchapi.concourse.server.ManagedConcourseServer in project concourse by cinchapi.
the class GH426 method testReproGH426.
@Test
public void testReproGH426() {
ConcourseCodebase codebase = ConcourseCodebase.cloneFromGithub();
String installer = codebase.buildInstaller();
ManagedConcourseServer server = ManagedConcourseServer.manageNewServer(new File(installer));
server.start();
Concourse client = server.connect();
long record = client.add("name", "jeff");
Assert.assertEquals("jeff", client.get("name", record));
}
use of com.cinchapi.concourse.server.ManagedConcourseServer in project concourse by cinchapi.
the class GH426 method testFreshInstallExistingData.
@Test
public void testFreshInstallExistingData() throws IOException {
// Ensure that commit 237556de81031c919fc8add3b773618ef750ca48 still
// works as expected
ManagedConcourseServer server = ManagedConcourseServer.manageNewServer("0.10.5");
server.start();
Concourse client = server.connect();
long record = client.add("name", "jeff");
server.stop();
String directory = server.getInstallDirectory();
ConcourseCodebase codebase = ConcourseCodebase.cloneFromGithub();
String installer = codebase.buildInstaller();
File src = new File(installer);
File dest = new File(server.getInstallDirectory() + "/concourse-server.bin");
Files.copy(src, dest);
// Run the upgrade from the installer
System.out.println("Upgrading Concourse Server...");
Process proc = new ProcessBuilder("sh", dest.getAbsolutePath(), "--", "skip-integration").directory(new File(server.getInstallDirectory())).start();
Processes.waitForSuccessfulCompletion(proc);
for (String line : Processes.getStdOut(proc)) {
System.out.println(line);
}
server = ManagedConcourseServer.manageExistingServer(directory);
server.start();
client = server.connect();
Assert.assertEquals("jeff", client.get("name", record));
}
Aggregations