@Test public void testUndeployBoth() throws IOException, URISyntaxException { CelosCiContext context = mock(CelosCiContext.class); File remoteFolderWf = tempDir.newFolder(); remoteFolderWf.mkdirs(); File wfFile = new File(remoteFolderWf, "workflow.js"); wfFile.createNewFile(); File remoteFolderDef = tempDir.newFolder(); remoteFolderDef.mkdirs(); File defFile = new File(remoteFolderDef, "workflow.js"); defFile.createNewFile(); CelosCiTarget target = new CelosCiTarget(URI.create(""), URI.create(""), remoteFolderWf.toURI(), remoteFolderDef.toURI(), URI.create("hiveJdbc")); doReturn(remoteFolderDef).when(context).getDeployDir(); doReturn(target).when(context).getTarget(); doReturn("workflow").when(context).getWorkflowName(); WorkflowFilesDeployer deployer = new WorkflowFilesDeployer(context); Assert.assertTrue(wfFile.exists()); Assert.assertTrue(defFile.exists()); deployer.undeploy(); Assert.assertFalse(wfFile.exists()); Assert.assertFalse(defFile.exists()); }
public void undeploy() throws FileSystemException, URISyntaxException { undeployJSFile(config.getTarget().getWorkflowsDirUri()); undeployJSFile(config.getTarget().getDefaultsDirUri()); }
WorkflowFilesDeployer { public void undeploy() throws FileSystemException, URISyntaxException { undeployJSFile(config.getTarget().getWorkflowsDirUri()); undeployJSFile(config.getTarget().getDefaultsDirUri()); } }
WorkflowFilesDeployer { public void undeploy() throws FileSystemException, URISyntaxException { undeployJSFile(config.getTarget().getWorkflowsDirUri()); undeployJSFile(config.getTarget().getDefaultsDirUri()); } WorkflowFilesDeployer(CelosCiContext context); }
WorkflowFilesDeployer { public void undeploy() throws FileSystemException, URISyntaxException { undeployJSFile(config.getTarget().getWorkflowsDirUri()); undeployJSFile(config.getTarget().getDefaultsDirUri()); } WorkflowFilesDeployer(CelosCiContext context); void undeploy(); void deploy(); }
WorkflowFilesDeployer { public void undeploy() throws FileSystemException, URISyntaxException { undeployJSFile(config.getTarget().getWorkflowsDirUri()); undeployJSFile(config.getTarget().getDefaultsDirUri()); } WorkflowFilesDeployer(CelosCiContext context); void undeploy(); void deploy(); static final String WORKFLOW_FILENAME; static final String DEFAULTS_FILENAME; }