diff options
author | Jerry Flood <jflood@att.com> | 2019-04-03 14:10:53 -0400 |
---|---|---|
committer | Jerry Flood <jflood@att.com> | 2019-04-03 14:13:18 -0400 |
commit | 197ac552793961824491144dab0c711f575a459d (patch) | |
tree | 80eb8c6105f15238f364019fff565e8660db36d5 /cmso-robot/robot/resources | |
parent | 8684696712cfe4120092b291cb124accc5712f62 (diff) |
Robot changes to support API changes
Issue-ID: OPTFRA-436
Change-Id: I8cb28ac56689716768750c3d863a64b95de8984c
Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-robot/robot/resources')
-rw-r--r-- | cmso-robot/robot/resources/misc.robot | 2 | ||||
-rw-r--r-- | cmso-robot/robot/resources/test_templates/change_management.robot | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cmso-robot/robot/resources/misc.robot b/cmso-robot/robot/resources/misc.robot index 0dd15e9..fe0154d 100644 --- a/cmso-robot/robot/resources/misc.robot +++ b/cmso-robot/robot/resources/misc.robot @@ -22,7 +22,7 @@ Validate Status Validate JSON Error [Documentation] Fails if messageIds do not match. expected_errors should be a list but a string would likely work as well - [Arguments] ${resp_json} ${expected_errors} ${listVars} + [Arguments] ${resp_json} ${expected_errors} ${listVars}=[] ${result}= Get From Dictionary ${resp_json['requestError']} messageId ${variables}= Get From Dictionary ${resp_json['requestError']} variables Should Contain ${expected_errors} ${result} #checks expected_errors list for the actual error received from schedule diff --git a/cmso-robot/robot/resources/test_templates/change_management.robot b/cmso-robot/robot/resources/test_templates/change_management.robot index 6f4167d..cfa958f 100644 --- a/cmso-robot/robot/resources/test_templates/change_management.robot +++ b/cmso-robot/robot/resources/test_templates/change_management.robot @@ -46,14 +46,15 @@ Change Management Rejection Template Change Management Failure Template [Documentation] Sends a post request expecting a failure. expected_status_code should be whatever code is expected for this call - [Arguments] ${request_file} ${expected_status_code} ${template_folder} + [Arguments] ${request_file} ${expected_status_code} ${template_folder} ${variables}=[] ${uuid}= Generate UUID ${resp}= Create Schedule ${uuid} ${request_file} ${template_folder} Should Be Equal as Strings ${resp.status_code} ${expected_status_code} Return from Keyword If '${resp.status_code}' == '202' #List of possible reasons that the request should fail - we should look for exact message..... @{status_list}= Create List Scheduler.INVALID_ATTRIBUTE Scheduler.MISSING_REQUIRED_ATTRIBUTE Scheduler.NODE_LIST_CONTAINS_EMTPY_NODE Scheduler.INVALID_CHANGE_WINDOW - Validate Json Error ${resp.json()} ${status_list} + @{listVars}= Evaluate ${variables} + Validate Json Error ${resp.json()} ${status_list} ${listVars} Change Management Immediate Template [Arguments] ${request_file} ${expected_status_code} ${template_folder} |