@Test public void processConsoleAndDaemons() throws Exception { Path archiveFile = TestHelper.getResource("/fixtures/hello-world-1.2.4-SNAPSHOT.zip"); try (Assembly assembly = Assemblys.process(archiveFile)) { assertThat(assembly.getName(), is("hello-world")); assertThat(assembly.getVersion(), is("1.2.4")); assertThat(assembly.isSnapshot(), is(true)); assertThat(assembly.getArchiveFile(), is(archiveFile)); assertThat(assembly.getUnpackedDir().getFileName().toString(), is("hello-world-1.2.4-SNAPSHOT")); Set<Daemon> sysvDaemons = assembly.getDaemons(InitType.SYSV); assertThat(sysvDaemons, hasSize(1)); assertThat(sysvDaemons, contains(new Daemon(InitType.SYSV, "hello-daemon", null, null))); Set<Daemon> systemdDaemons = assembly.getDaemons(InitType.SYSTEMD); assertThat(systemdDaemons, hasSize(1)); assertThat(systemdDaemons, contains(new Daemon(InitType.SYSTEMD, "hello-daemon", null, null))); assembly.verify(); systemdDaemons.clear(); try { assembly.verify(); fail(); } catch (DeployerException e) { assertThat(e.getMessage(), containsString("Size mismatch")); } } }
static public Assembly process(Path archiveFile) throws IOException { Path tempDir = Files.createTempDirectory("stork-deploy."); CloseablePath closeablePath = new CloseablePath(tempDir); return process(archiveFile, tempDir, Arrays.asList(closeablePath)); }
Assemblys { static public Assembly process(Path archiveFile) throws IOException { Path tempDir = Files.createTempDirectory("stork-deploy."); CloseablePath closeablePath = new CloseablePath(tempDir); return process(archiveFile, tempDir, Arrays.asList(closeablePath)); } }
Assemblys { static public Assembly process(Path archiveFile) throws IOException { Path tempDir = Files.createTempDirectory("stork-deploy."); CloseablePath closeablePath = new CloseablePath(tempDir); return process(archiveFile, tempDir, Arrays.asList(closeablePath)); }  }
Assemblys { static public Assembly process(Path archiveFile) throws IOException { Path tempDir = Files.createTempDirectory("stork-deploy."); CloseablePath closeablePath = new CloseablePath(tempDir); return process(archiveFile, tempDir, Arrays.asList(closeablePath)); }  static Assembly process(Path archiveFile); static Assembly process(Path archiveFile, Path workDir, List<Closeable> resources); }
Assemblys { static public Assembly process(Path archiveFile) throws IOException { Path tempDir = Files.createTempDirectory("stork-deploy."); CloseablePath closeablePath = new CloseablePath(tempDir); return process(archiveFile, tempDir, Arrays.asList(closeablePath)); }  static Assembly process(Path archiveFile); static Assembly process(Path archiveFile, Path workDir, List<Closeable> resources);  }