@BeforeMethod public void setUp() throws Exception { installationHelper = new InstallationHelper(); appleInstallation = installationHelper.getAppleInstallation(); bananaInstallation = installationHelper.getBananaInstallation(); tempDir = Files.createTempDir().getCanonicalFile(); final AgentConfig config = new AgentConfig(); manager = new DirectoryDeploymentManager(tempDir, "/location/test", config.getTarTimeout()); }
@BeforeMethod public void setUp() throws Exception { installationHelper = new InstallationHelper(); appleInstallation = installationHelper.getAppleInstallation(); bananaInstallation = installationHelper.getBananaInstallation(); tempDir = Files.createTempDir().getCanonicalFile(); final AgentConfig config = new AgentConfig(); manager = new DirectoryDeploymentManager(tempDir, "/location/test", config.getTarTimeout()); }
@BeforeClass public void startServer() throws Exception { tempDir = createTempDir("agent"); Map<String, String> properties = ImmutableMap.<String, String>builder() .put("agent.id", UUID.randomUUID().toString()) .put("agent.coordinator-uri", "http://localhost:9999/") .put("agent.slots-dir", tempDir.getAbsolutePath()) .put("discovery.uri", "fake://server") .build(); Injector injector = Guice.createInjector( new TestingDiscoveryModule(), new TestingNodeModule(), new JsonModule(), new TestingHttpServerModule(), new JaxrsModule(), new EventModule(), new AgentMainModule(), new ConfigurationModule(new ConfigurationFactory(properties))); server = injector.getInstance(TestingHttpServer.class); agent = injector.getInstance(Agent.class); server.start(); client = new JettyHttpClient(); installationHelper = new InstallationHelper(); appleInstallation = installationHelper.getAppleInstallation(); bananaInstallation = installationHelper.getBananaInstallation(); }
@BeforeClass public void startServer() throws Exception { tempDir = createTempDir("agent"); Map<String, String> properties = ImmutableMap.<String, String>builder() .put("agent.id", UUID.randomUUID().toString()) .put("agent.coordinator-uri", "http://localhost:9999/") .put("agent.slots-dir", tempDir.getAbsolutePath()) .put("discovery.uri", "fake://server") .build(); Injector injector = Guice.createInjector( new TestingDiscoveryModule(), new TestingNodeModule(), new JsonModule(), new TestingHttpServerModule(), new JaxrsModule(), new EventModule(), new AgentMainModule(), new ConfigurationModule(new ConfigurationFactory(properties))); server = injector.getInstance(TestingHttpServer.class); agent = injector.getInstance(Agent.class); server.start(); client = new ApacheHttpClient(); installationHelper = new InstallationHelper(); appleInstallation = installationHelper.getAppleInstallation(); bananaInstallation = installationHelper.getBananaInstallation(); }