diff options
author | a.sreekumar <ajith.sreekumar@bell.ca> | 2021-06-22 15:55:46 +0100 |
---|---|---|
committer | a.sreekumar <ajith.sreekumar@bell.ca> | 2021-06-28 10:36:48 +0100 |
commit | 926646d8e5e86e680a119360f93d7bdb46c89435 (patch) | |
tree | 7ff431e59672b19f658faed87c80b4d147253c9c /auth/cli-editor/src/test/java | |
parent | 63637d939697451d3ac63216d938780a157ff895 (diff) |
Changes to support multiple outputs from a state
This review addresses two main changes:
1) inputFields and outputFields are not tied to task definition anymore.
Instead inputEvent and outputEvents associated to a task is populated
as part of the policy state definition, as the state definition have
the information anyway.
- Clean up of the usage of inputFields and outputFields in task
definition will happen in a future review
- inputFields and outputFields defined in task definition in
policies until honolulu will not make the policy invalid as the
changes are done in backward compatible way.
2) Multiple output events can come out of a final state now.
- Define another policy state output with the relevant eventName in
the command file
- In the task logic, create a map to store the fields of the relevant
outputEvent, and then just call
"executor.addFieldsToOutput(<the_map_of_fields>)"
These 2 steps are enough to send multiple events to relevant
components as per the apex configuration.
Change-Id: Id88ca402704106404f529e595e1a76f6bf167876
Issue-ID: POLICY-3336
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'auth/cli-editor/src/test/java')
-rw-r--r-- | auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java index d00a9232b..0e87950d2 100644 --- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,7 +85,7 @@ public class CommandLineEditorEventsContextTest { final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length(); assertEquals(25892, logCharCount); - assertEquals(46048, modelCharCount); + assertEquals(51975, modelCharCount); } /** @@ -114,7 +115,7 @@ public class CommandLineEditorEventsContextTest { final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length(); assertEquals(30068, logCharCount); - assertEquals(52596, modelCharCount); + assertEquals(59015, modelCharCount); } |