From 1bd55df564da0a60267f3cf6c1b53bb7a08d6a6a Mon Sep 17 00:00:00 2001 From: Matt Casters Date: Fri, 2 Dec 2022 10:00:43 +0100 Subject: [PATCH] Fix #1860 : Transform Get Subfolders is broken (IT fix) HOP-4379 : Cleanup XML of action Create Folder --- .../hop/workflow/action/ActionBase.java | 9 + .../0012-get-subfolder-names.hpl | 234 ++---------------- .../datasets/0012-get-subfolder-names.csv | 28 +-- .../main-0012-get-subfolder-names.hwf | 155 ++++++++++-- .../transforms/0060-get-subfolder-names.hpl | 199 +-------------- .../datasets/golden-get-subfolder-names.csv | 30 +-- .../main-0060-get-subfolder-names.hwf | 105 +++++++- .../createfolder/ActionCreateFolder.java | 183 +++++++------- .../ActionCreateFolderDialog.java | 10 +- ...eTest.java => ActionCreateFolderTest.java} | 29 +-- .../test/resources/create-folder-action.xml | 22 ++ 11 files changed, 400 insertions(+), 604 deletions(-) rename plugins/actions/createfolder/src/test/java/org/apache/hop/workflow/actions/createfolder/{WorkflowActionCreateFolderLoadSaveTest.java => ActionCreateFolderTest.java} (56%) create mode 100644 plugins/actions/createfolder/src/test/resources/create-folder-action.xml diff --git a/engine/src/main/java/org/apache/hop/workflow/action/ActionBase.java b/engine/src/main/java/org/apache/hop/workflow/action/ActionBase.java index 0094da5f716..8e5f68cb5f2 100644 --- a/engine/src/main/java/org/apache/hop/workflow/action/ActionBase.java +++ b/engine/src/main/java/org/apache/hop/workflow/action/ActionBase.java @@ -140,6 +140,15 @@ protected ActionBase(String name, String description) { extensionDataMap = new HashMap<>(); } + /** + * Copy constructor variant + * @param b The action base to copy + */ + protected ActionBase(ActionBase b) { + this(b.name, b.description); + } + + /** * Checks if the Action object is equal to the specified object * diff --git a/integration-tests/beam_directrunner/0012-get-subfolder-names.hpl b/integration-tests/beam_directrunner/0012-get-subfolder-names.hpl index 13178035aa3..2cfd048f437 100644 --- a/integration-tests/beam_directrunner/0012-get-subfolder-names.hpl +++ b/integration-tests/beam_directrunner/0012-get-subfolder-names.hpl @@ -25,7 +25,13 @@ limitations under the License. Normal + 0 + + TEST_FOLDER + /tmp/0012 + + N 1000 @@ -43,26 +49,11 @@ limitations under the License. folderName, rowNumber only Y - - Select values - lookup folder - Y - folderName, rowNumber only projectHome Y - - folders - lookup folder - Y - - - lookup folder - only found - Y - projectHome shortName @@ -74,12 +65,7 @@ limitations under the License. Y - only found - limit - Y - - - limit + Select values /tmp/0012/get-subfolder-names*.csv Y @@ -101,7 +87,7 @@ limitations under the License. N - 944 + 608 176 @@ -116,15 +102,14 @@ limitations under the License. none - Y - N - rowNumber - - 0 - ${PROJECT_HOME} Y + ${TEST_FOLDER} + N + 0 + Y + rowNumber 112 @@ -183,195 +168,6 @@ limitations under the License. 64 - - folders - DataGrid - - Y - - 1 - - none - - - - - metadata - - - metadata/workflow-run-configuration - - - metadata/cassandra-connection - - - metadata/execution-info-location - - - metadata/rdbms - - - metadata/pipeline-probe - - - metadata/neo4j-connection - - - metadata/unit-test - - - metadata/splunk - - - metadata/partition - - - metadata/neo4j-graph-model - - - metadata/dataset - - - metadata/server - - - metadata/file-definition - - - metadata/pipeline-run-configuration - - - metadata/async-web-service - - - metadata/execution-data-profile - - - metadata/mongodb-connection - - - metadata/web-service - - - metadata/workflow-log - - - metadata/pipeline-log - - - input - - - datasets - - - output - - - - - -1 - -1 - N - folder - String - - - - - 400 - 288 - - - - limit - SelectValues - - Y - - 1 - - none - - - - - rowNumber - - - shortName - - N - - - - 736 - 176 - - - - lookup folder - StreamLookup - - Y - - 1 - - none - - - folders - N - N - N - N - - - shortName - folder - - - folder - found - - String - - - - - 496 - 176 - - - - only found - FilterRows - - Y - - 1 - - none - - - - - - - IS NOT NULL - found - N - - - - - /tmp/not-found*.csv - limit - - - 624 - 176 - - projectHome GetVariable @@ -386,7 +182,7 @@ limitations under the License. projectHome - ${PROJECT_HOME} + ${TEST_FOLDER} String @@ -467,7 +263,7 @@ var shortName = replace(folderName, projectHome+"/", ""); - 672 + 688 64 diff --git a/integration-tests/beam_directrunner/datasets/0012-get-subfolder-names.csv b/integration-tests/beam_directrunner/datasets/0012-get-subfolder-names.csv index 03fe83e37b7..59d32e033ce 100644 --- a/integration-tests/beam_directrunner/datasets/0012-get-subfolder-names.csv +++ b/integration-tests/beam_directrunner/datasets/0012-get-subfolder-names.csv @@ -1,25 +1,5 @@ id,shortFolder -1,datasets -2,input -3,metadata -4,metadata/async-web-service -5,metadata/cassandra-connection -6,metadata/dataset -7,metadata/execution-data-profile -8,metadata/execution-info-location -9,metadata/file-definition -10,metadata/mongodb-connection -11,metadata/neo4j-connection -12,metadata/neo4j-graph-model -13,metadata/partition -14,metadata/pipeline-log -15,metadata/pipeline-probe -16,metadata/pipeline-run-configuration -17,metadata/rdbms -18,metadata/server -19,metadata/splunk -20,metadata/unit-test -21,metadata/web-service -22,metadata/workflow-log -23,metadata/workflow-run-configuration -24,output +1,one +2,one/alpha +3,three +4,two diff --git a/integration-tests/beam_directrunner/main-0012-get-subfolder-names.hwf b/integration-tests/beam_directrunner/main-0012-get-subfolder-names.hwf index a0ddeff0d7e..a0bbe2a2910 100644 --- a/integration-tests/beam_directrunner/main-0012-get-subfolder-names.hwf +++ b/integration-tests/beam_directrunner/main-0012-get-subfolder-names.hwf @@ -44,8 +44,8 @@ limitations under the License. 0 1 N - 80 - 80 + 64 + 48 @@ -72,62 +72,165 @@ limitations under the License. Y N - 512 - 80 + 384 + 256 - Delete /tmp/0012/*.csv + Run Pipeline Unit Tests - DELETE_FILES + RunPipelineTests + + + + 0012-get-subfolder-names-validation UNIT + + + N + 608 + 256 + + + + delete /tmp/0012/ + + DELETE_FOLDERS N - N + success_if_no_errors + 10 - ${java.io.tmpdir}/0012/ - get-subfolder-names-.*\.csv$ + ${TEST_FOLDER} N - 272 - 80 + 384 + 48 - Run Pipeline Unit Tests + /tmp/0012/one - RunPipelineTests + CREATE_FOLDER - - - 0012-get-subfolder-names-validation UNIT - - + ${TEST_FOLDER}/one + N N - 752 - 80 + 608 + 48 + + + + /tmp/0012/one/alpha/ + + CREATE_FOLDER + + ${TEST_FOLDER}/one/alpha/ + N + N + 800 + 48 + + + + /tmp/0012/two + + CREATE_FOLDER + + ${TEST_FOLDER}/two + N + N + 384 + 144 + + + + /tmp/0060/three + + CREATE_FOLDER + + ${TEST_FOLDER}/three + N + N + 608 + 144 + + + + ${TEST_FOLDER} + + SET_VARIABLES + + Y + + CURRENT_WORKFLOW + + + TEST_FOLDER + ${java.io.tmpdir}/0012 + CURRENT_WORKFLOW + + + N + 208 + 48 - Start - Delete /tmp/0012/*.csv + 0012-get-subfolder-names + Run Pipeline Unit Tests Y Y - Y + N + + + delete /tmp/0012/ + /tmp/0012/one + Y + Y + N + + + /tmp/0012/one + /tmp/0012/one/alpha/ + Y + Y + N + + + /tmp/0012/one/alpha/ + /tmp/0012/two + Y + Y + N + + + /tmp/0012/two + /tmp/0060/three + Y + Y + N - Delete /tmp/0012/*.csv + /tmp/0060/three 0012-get-subfolder-names Y Y N - 0012-get-subfolder-names - Run Pipeline Unit Tests + Start + ${TEST_FOLDER} + Y + Y + Y + + + ${TEST_FOLDER} + delete /tmp/0012/ Y Y N diff --git a/integration-tests/transforms/0060-get-subfolder-names.hpl b/integration-tests/transforms/0060-get-subfolder-names.hpl index 5a954d56da0..a42c06e44b6 100644 --- a/integration-tests/transforms/0060-get-subfolder-names.hpl +++ b/integration-tests/transforms/0060-get-subfolder-names.hpl @@ -60,21 +60,6 @@ limitations under the License. Select values - lookup folder - Y - - - folders - lookup folder - Y - - - lookup folder - only found - Y - - - only found validate Y @@ -90,15 +75,14 @@ limitations under the License. none - Y - N - rowNumber - - 0 - ${PROJECT_HOME} Y + ${java.io.tmpdir}/0060/ + N + 0 + Y + rowNumber 112 @@ -157,173 +141,6 @@ limitations under the License. 48 - - folders - DataGrid - - Y - - 1 - - none - - - - - datasets - - - files - - - files/excel - - - metadata - - - metadata/async-web-service - - - metadata/cassandra-connection - - - metadata/dataset - - - metadata/execution-data-profile - - - metadata/execution-info-location - - - metadata/file-definition - - - metadata/git - - - metadata/log-reader - - - metadata/mongodb-connection - - - metadata/neo4j-connection - - - metadata/neo4j-graph-model - - - metadata/partition - - - metadata/pipeline-log - - - metadata/pipeline-probe - - - metadata/pipeline-run-configuration - - - metadata/rdbms - - - metadata/server - - - metadata/splunk - - - metadata/unit-test - - - metadata/web-service - - - metadata/workflow-log - - - metadata/workflow-run-configuration - - - - - -1 - -1 - N - folder - String - - - - - 432 - 272 - - - - lookup folder - StreamLookup - - Y - - 1 - - none - - - folders - N - N - N - N - - - shortName - folder - - - folder - found - - String - - - - - 496 - 160 - - - - only found - FilterRows - - Y - - 1 - - none - - - - - - - IS NOT NULL - found - N - - - - - - - 624 - 160 - - projectHome GetVariable @@ -338,7 +155,7 @@ limitations under the License. projectHome - ${PROJECT_HOME} + ${java.io.tmpdir}/0060/ String @@ -351,7 +168,7 @@ limitations under the License. - 544 + 528 48 @@ -436,7 +253,7 @@ var shortName = replace(folderName, projectHome+"/", ""); - 752 + 576 160 diff --git a/integration-tests/transforms/datasets/golden-get-subfolder-names.csv b/integration-tests/transforms/datasets/golden-get-subfolder-names.csv index 866dafe0c88..aea750d2868 100644 --- a/integration-tests/transforms/datasets/golden-get-subfolder-names.csv +++ b/integration-tests/transforms/datasets/golden-get-subfolder-names.csv @@ -1,27 +1,5 @@ rowNumber,shortName -1,datasets -2,files -3,files/excel -4,metadata -5,metadata/async-web-service -6,metadata/cassandra-connection -7,metadata/dataset -8,metadata/execution-data-profile -9,metadata/execution-info-location -10,metadata/file-definition -11,metadata/git -12,metadata/log-reader -13,metadata/mongodb-connection -14,metadata/neo4j-connection -15,metadata/neo4j-graph-model -16,metadata/partition -17,metadata/pipeline-log -18,metadata/pipeline-probe -19,metadata/pipeline-run-configuration -20,metadata/rdbms -21,metadata/server -22,metadata/splunk -23,metadata/unit-test -24,metadata/web-service -25,metadata/workflow-log -26,metadata/workflow-run-configuration +1,/tmp/0060/one +2,/tmp/0060/one/alpha +3,/tmp/0060/three +4,/tmp/0060/two diff --git a/integration-tests/transforms/main-0060-get-subfolder-names.hwf b/integration-tests/transforms/main-0060-get-subfolder-names.hwf index e04fa1b4216..243b063b994 100644 --- a/integration-tests/transforms/main-0060-get-subfolder-names.hwf +++ b/integration-tests/transforms/main-0060-get-subfolder-names.hwf @@ -59,19 +59,120 @@ limitations under the License. N - 304 + 848 + 160 + + + + delete /tmp/0060/ + + DELETE_FOLDERS + + N + success_if_no_errors + 10 + + + ${java.io.tmpdir}/0060/ + + + N + 288 + 80 + + + + /tmp/0060/one + + CREATE_FOLDER + + /tmp/0060/one + N + N + 464 + 80 + + + + /tmp/0060/one/alpha/ + + CREATE_FOLDER + + /tmp/0060/one/alpha/ + N + N + 624 80 + + /tmp/0060/two + + CREATE_FOLDER + + /tmp/0060/two + N + N + 464 + 160 + + + + /tmp/0060/three + + CREATE_FOLDER + + /tmp/0060/three + N + N + 624 + 160 + + Start - Run Pipeline Unit Tests + delete /tmp/0060/ + Y + Y + Y + + + delete /tmp/0060/ + /tmp/0060/one Y Y Y + + /tmp/0060/one + /tmp/0060/one/alpha/ + Y + Y + N + + + /tmp/0060/one/alpha/ + /tmp/0060/two + Y + Y + N + + + /tmp/0060/two + /tmp/0060/three + Y + Y + N + + + /tmp/0060/three + Run Pipeline Unit Tests + Y + Y + N + diff --git a/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java b/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java index d8922e61306..78f6f87de8a 100644 --- a/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java +++ b/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java @@ -17,15 +17,15 @@ package org.apache.hop.workflow.actions.createfolder; +import org.apache.commons.lang.StringUtils; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileType; import org.apache.hop.core.ICheckResult; import org.apache.hop.core.Result; import org.apache.hop.core.annotations.Action; -import org.apache.hop.core.exception.HopXmlException; import org.apache.hop.core.variables.IVariables; import org.apache.hop.core.vfs.HopVfs; -import org.apache.hop.core.xml.XmlHandler; +import org.apache.hop.metadata.api.HopMetadataProperty; import org.apache.hop.metadata.api.IHopMetadataProvider; import org.apache.hop.workflow.WorkflowMeta; import org.apache.hop.workflow.action.ActionBase; @@ -34,9 +34,7 @@ import org.apache.hop.workflow.action.validator.ActionValidatorUtils; import org.apache.hop.workflow.action.validator.AndValidator; import org.apache.hop.workflow.action.validator.ValidatorContext; -import org.w3c.dom.Node; -import java.io.IOException; import java.util.List; /** @@ -52,60 +50,32 @@ keywords = "i18n::ActionCreateFolder.keyword", documentationUrl = "/workflow/actions/createfolder.html") public class ActionCreateFolder extends ActionBase implements Cloneable, IAction { + + @HopMetadataProperty(key = "foldername") private String folderName; - private boolean failOfFolderExists; + + @HopMetadataProperty(key = "fail_of_folder_exists") + private boolean failIfFolderExists; public ActionCreateFolder(String n) { super(n, ""); folderName = null; - failOfFolderExists = true; + failIfFolderExists = true; } public ActionCreateFolder() { this(""); } - @Override - public Object clone() { - ActionCreateFolder je = (ActionCreateFolder) super.clone(); - return je; + public ActionCreateFolder(ActionCreateFolder f) { + super(f); + this.folderName = f.folderName; + this.failIfFolderExists = f.failIfFolderExists; } @Override - public String getXml() { - StringBuilder xml = new StringBuilder(50); - - xml.append(super.getXml()); - xml.append(" ").append(XmlHandler.addTagValue("foldername", folderName)); - xml.append(" ") - .append(XmlHandler.addTagValue("fail_of_folder_exists", failOfFolderExists)); - - return xml.toString(); - } - - @Override - public void loadXml(Node entrynode, IHopMetadataProvider metadataProvider, IVariables variables) - throws HopXmlException { - try { - super.loadXml(entrynode); - folderName = XmlHandler.getTagValue(entrynode, "foldername"); - failOfFolderExists = - "Y".equalsIgnoreCase(XmlHandler.getTagValue(entrynode, "fail_of_folder_exists")); - } catch (HopXmlException xe) { - throw new HopXmlException("Unable to load action of type 'create folder' from XML node", xe); - } - } - - public void setFoldername(String folderName) { - this.folderName = folderName; - } - - public String getFoldername() { - return folderName; - } - - public String getRealFoldername() { - return resolve(getFoldername()); + public ActionCreateFolder clone() { + return new ActionCreateFolder(this); } @Override @@ -113,59 +83,50 @@ public Result execute(Result previousResult, int nr) { Result result = previousResult; result.setResult(false); - if (folderName != null) { - String realFoldername = getRealFoldername(); - FileObject folderObject = null; - try { - folderObject = HopVfs.getFileObject(realFoldername); + if (StringUtils.isEmpty(folderName)) { + logError("No folder name is defined."); + return result; + } - if (folderObject.exists()) { - boolean isFolder = false; + String realFolderName = getRealFolderName(); + try (FileObject folderObject = HopVfs.getFileObject(realFolderName)) { - // Check if it's a folder - if (folderObject.getType() == FileType.FOLDER) { - isFolder = true; - } + if (folderObject.exists()) { + boolean isFolder = folderObject.getType() == FileType.FOLDER; - if (isFailOfFolderExists()) { - // Folder exists and fail flag is on. - result.setResult(false); - if (isFolder) { - logError("Folder [" + realFoldername + "] exists, failing."); - } else { - logError("File [" + realFoldername + "] exists, failing."); - } + // Check if it's a folder + // + if (isFailIfFolderExists()) { + // Folder exists and fail flag is enabled. + // + result.setResult(false); + if (isFolder) { + logError("Folder [" + realFolderName + "] exists, failing."); } else { - // Folder already exists, no reason to try to create it - result.setResult(true); - if (log.isDetailed()) { - logDetailed("Folder [" + realFoldername + "] already exists, not recreating."); - } + logError("File [" + realFolderName + "] exists, failing."); } - } else { - // No Folder yet, create an empty Folder. - folderObject.createFolder(); - if (log.isDetailed()) { - logDetailed("Folder [" + realFoldername + "] created!"); - } + // Folder already exists: there is no reason to try and create it. + // result.setResult(true); - } - } catch (Exception e) { - logError("Could not create Folder [" + realFoldername + "]", e); - result.setResult(false); - result.setNrErrors(1); - } finally { - if (folderObject != null) { - try { - folderObject.close(); - } catch (IOException ex) { - /* Ignore */ + if (log.isDetailed()) { + logDetailed("Folder [" + realFolderName + "] already exists, not recreating."); } } + return result; + } + + // No Folder yet, create an empty Folder. + folderObject.createFolder(); + if (log.isDetailed()) { + logDetailed("Folder [" + realFolderName + "] created!"); } - } else { - logError("No Foldername is defined."); + result.setResult(true); + + } catch (Exception e) { + logError("Could not create Folder [" + realFolderName + "]", e); + result.setResult(false); + result.setNrErrors(1); } return result; @@ -176,14 +137,6 @@ public boolean isEvaluation() { return true; } - public boolean isFailOfFolderExists() { - return failOfFolderExists; - } - - public void setFailOfFolderExists(boolean failIfFolderExists) { - this.failOfFolderExists = failIfFolderExists; - } - @Override public void check( List remarks, @@ -198,4 +151,44 @@ public void check( ActionValidatorUtils.fileDoesNotExistValidator()); ActionValidatorUtils.andValidator().validate(this, "filename", remarks, ctx); } + + public String getRealFolderName() { + return resolve(getFolderName()); + } + + /** + * Gets folderName + * + * @return value of folderName + */ + public String getFolderName() { + return folderName; + } + + /** + * Sets folderName + * + * @param folderName value of folderName + */ + public void setFolderName(String folderName) { + this.folderName = folderName; + } + + /** + * Gets failIfFolderExists + * + * @return value of failIfFolderExists + */ + public boolean isFailIfFolderExists() { + return failIfFolderExists; + } + + /** + * Sets failIfFolderExists + * + * @param failIfFolderExists value of failIfFolderExists + */ + public void setFailIfFolderExists(boolean failIfFolderExists) { + this.failIfFolderExists = failIfFolderExists; + } } diff --git a/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolderDialog.java b/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolderDialog.java index 919db3c2bad..ea5997c532c 100644 --- a/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolderDialog.java +++ b/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolderDialog.java @@ -184,10 +184,10 @@ public void getData() { if (action.getName() != null) { wName.setText(action.getName()); } - if (action.getFoldername() != null) { - wFoldername.setText(action.getFoldername()); + if (action.getFolderName() != null) { + wFoldername.setText(action.getFolderName()); } - wAbortExists.setSelection(action.isFailOfFolderExists()); + wAbortExists.setSelection(action.isFailIfFolderExists()); wName.selectAll(); wName.setFocus(); @@ -208,8 +208,8 @@ private void ok() { return; } action.setName(wName.getText()); - action.setFoldername(wFoldername.getText()); - action.setFailOfFolderExists(wAbortExists.getSelection()); + action.setFolderName(wFoldername.getText()); + action.setFailIfFolderExists(wAbortExists.getSelection()); dispose(); } } diff --git a/plugins/actions/createfolder/src/test/java/org/apache/hop/workflow/actions/createfolder/WorkflowActionCreateFolderLoadSaveTest.java b/plugins/actions/createfolder/src/test/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolderTest.java similarity index 56% rename from plugins/actions/createfolder/src/test/java/org/apache/hop/workflow/actions/createfolder/WorkflowActionCreateFolderLoadSaveTest.java rename to plugins/actions/createfolder/src/test/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolderTest.java index ad1d24102b2..5729ae52ad0 100644 --- a/plugins/actions/createfolder/src/test/java/org/apache/hop/workflow/actions/createfolder/WorkflowActionCreateFolderLoadSaveTest.java +++ b/plugins/actions/createfolder/src/test/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolderTest.java @@ -13,27 +13,24 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * */ -package org.apache.hop.workflow.actions.createfolder; -import org.apache.hop.junit.rules.RestoreHopEngineEnvironment; -import org.apache.hop.workflow.action.loadsave.WorkflowActionLoadSaveTestSupport; -import org.junit.ClassRule; +package org.apache.hop.workflow.actions.createfolder; -import java.util.Arrays; -import java.util.List; +import org.apache.hop.workflow.action.ActionSerializationTestUtil; +import org.junit.Assert; +import org.junit.Test; -public class WorkflowActionCreateFolderLoadSaveTest - extends WorkflowActionLoadSaveTestSupport { - @ClassRule public static RestoreHopEngineEnvironment env = new RestoreHopEngineEnvironment(); +public class ActionCreateFolderTest { - @Override - protected Class getActionClass() { - return ActionCreateFolder.class; - } + @Test + public void testSerialization() throws Exception { + ActionCreateFolder action = + ActionSerializationTestUtil.testSerialization( + "/create-folder-action.xml", ActionCreateFolder.class); - @Override - protected List listAttributes() { - return Arrays.asList("foldername", "failOfFolderExists"); + Assert.assertEquals("${TEST_FOLDER}/one", action.getFolderName()); + Assert.assertTrue(action.isFailIfFolderExists()); } } diff --git a/plugins/actions/createfolder/src/test/resources/create-folder-action.xml b/plugins/actions/createfolder/src/test/resources/create-folder-action.xml new file mode 100644 index 00000000000..d0e2666088a --- /dev/null +++ b/plugins/actions/createfolder/src/test/resources/create-folder-action.xml @@ -0,0 +1,22 @@ + + + + ${TEST_FOLDER}/one + Y +