AMATERASU-51: Add support for configuring the path for action level environment path
authorEran Bartenstein <eran.bartenstein@nab.com.au>
Sat, 24 Nov 2018 00:06:20 +0000 (11:06 +1100)
committerEran Bartenstein <eran.bartenstein@nab.com.au>
Sat, 24 Nov 2018 00:06:20 +0000 (11:06 +1100)
Add test for JobParserTests to test config is read correctly.

leader/src/test/resources/simple-maki.yml
leader/src/test/scala/org/apache/amaterasu/common/execution/JobParserTests.scala

index 151c89b..b9c8e60 100755 (executable)
@@ -22,13 +22,16 @@ flow:
       group: spark
       type: scala
       src: simple-spark.scala
+      config: start-cfg
     - name: step2
       group: spark
       type: scala
       src: file2.scala
+      config: step2-cfg
       error:
         name: error-action
         group: spark
         type: scala
         src: error.scala
-...
\ No newline at end of file
+       config: error-cfg
+...
index 3af00e6..9332847 100755 (executable)
@@ -61,4 +61,14 @@ class JobParserTests extends FlatSpec with Matchers {
 
   }
 
+  it should "Action 'config' is parsed successfully" in {
+
+    job.getRegisteredActions.size should be(3)
+
+    job.getRegisteredActions.get("0000000000").data.getConfig should be("start-cfg")
+    job.getRegisteredActions.get("0000000001").data.getConfig should be("step2-cfg")
+    job.getRegisteredActions.get("0000000001-error").data.getConfig should be("error-cfg")
+
+  }
+
 }