Add support to take user variable input from CLI
Changes:
- added new paramerted in the suite
Tested:
With -v TASK_JSON_FILE_PATH:<file path>
Without TASK_JSON_FILE_PATH and ensure default
point to file data/task_state.json
Change-Id: I00e94f98169e83badcb2d8e3e6c7af4766ced97c
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/task_service/test_tasks.robot b/redfish/task_service/test_tasks.robot
index 9182802..fa9a6b5 100644
--- a/redfish/task_service/test_tasks.robot
+++ b/redfish/task_service/test_tasks.robot
@@ -13,11 +13,9 @@
Suite Teardown Suite Teardown Execution
Test Teardown FFDC On Test Case Fail
-
*** Variables ***
${TIME_REGEXP_PATTERN} (.+)[\\-|\\+]\\d\\d\\:\\d\\d
-
*** Test Cases ***
Verify Task Service Attributes
@@ -237,7 +235,10 @@
Load Task Service Properties Data
[Documentation] Load the task service related properties from json file.
- ${json}= OperatingSystem.Get File data/task_state.json
+ # User input -v TASK_JSON_FILE_PATH:<path> else default path.
+ ${task_json_file}= Get Variable Value ${TASK_JSON_FILE_PATH} data/task_state.json
+
+ ${json}= OperatingSystem.Get File ${task_json_file}
${properties}= Evaluate json.loads('''${json}''') json
Set Suite Variable ${allowed_completed_task_overwrite_policy}
@@ -250,4 +251,4 @@
... ${properties["Task"]["TaskState"]["AllowedCompletionTaskState"]}
Set Suite Variable ${valid_status}
- ... ${properties["TaskService"]["Status"]}
\ No newline at end of file
+ ... ${properties["TaskService"]["Status"]}