mrutkows commented on a change in pull request #678: Parameterizing trigger 
name rule name as well as triggers and actions inside rule
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/678#discussion_r159533653
 
 

 ##########
 File path: parsers/manifest_parser_test.go
 ##########
 @@ -1683,6 +1683,39 @@ func TestPackageName_Env_Var(t *testing.T) {
     }
 }
 
+func TestRuleName_Env_Var(t *testing.T) {
+    // read and parse manifest file with env var for rule name, and rule 
trigger and action
+    testRule := "test_rule"
+    os.Setenv("rule_name", testRule)
+    testTrigger := "test_trigger"
+    os.Setenv("trigger_name", testTrigger)
+    testAction := "test_actions"
+    os.Setenv("action_name", testAction);
+    mm := NewYAMLParser()
+    manifestfile := "../tests/dat/manifest_data_rule_env_var.yaml"
+    manifest, _ := mm.ParseManifest(manifestfile)
+    rules, err := mm.ComposeRulesFromAllPackages(manifest)
+    if err != nil {
+        assert.Fail(t, "Failed to compose rules")
+    }
+    packageName := "manifest1"
+
+    assert.Equal(t, 1, len(manifest.Packages[packageName].Rules), "Get trigger 
list failed.")
 
 Review comment:
   Rule list?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to