From de929b31c7eaeb5f8769028e4e80f265afadef39 Mon Sep 17 00:00:00 2001 From: matthew-mcneilly Date: Wed, 12 May 2021 14:54:27 +0100 Subject: [PATCH] [CSIT] Fix SDC CSIT Run Errors/Warnings & Path Correction Use of old for loop syntax causing failure in SDC CSIT "Support for the old for loop syntax has been removed. Replace ': FOR' with 'FOR', end the loop with 'END', and remove escaping backslashes." Testplan.txt path pointing to sanity instead of uiSanity causing wrong testplan to be executed. Fix for sdc-helm-validator warning "Verify That Sdc Helm Validator Responds With Error For Chart Valid... [ WARN ] Keyword 'RequestsLibrary.Post Request' is deprecated. Please use `POST On Session` instead." Issue-ID: SDC-3573 Signed-off-by: matthew-mcneilly Change-Id: Idff668b05330eaf685ab519ee2a0d7cd4fed7ceb --- plans/sdc/uiSanity/testplan.txt | 2 +- tests/sdc/nightly/test1.robot | 5 +++-- tests/sdc/sanity/test1.robot | 5 +++-- tests/sdc/sdc-helm-validator/sdc-helm-validator.robot | 4 ++-- tests/sdc/uiSanity/test1.robot | 5 +++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/plans/sdc/uiSanity/testplan.txt b/plans/sdc/uiSanity/testplan.txt index 9f21c693..7b0f708e 100644 --- a/plans/sdc/uiSanity/testplan.txt +++ b/plans/sdc/uiSanity/testplan.txt @@ -1,3 +1,3 @@ # Test suites are relative paths under [integration/csit.git]/tests/. # Place the suites in run order. -sdc/sanity +sdc/uiSanity diff --git a/tests/sdc/nightly/test1.robot b/tests/sdc/nightly/test1.robot index 2b92be74..6567b51e 100644 --- a/tests/sdc/nightly/test1.robot +++ b/tests/sdc/nightly/test1.robot @@ -12,5 +12,6 @@ Get Requests health check ok ${resp}= Get Request sdc-fe /sdc1/rest/healthCheck headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 @{ITEMS}= Copy List ${resp.json()['componentsInfo']} - : FOR ${ELEMENT} IN @{ITEMS} - \ Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} + FOR ${ELEMENT} IN @{ITEMS} + Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} + END diff --git a/tests/sdc/sanity/test1.robot b/tests/sdc/sanity/test1.robot index 2b92be74..6567b51e 100644 --- a/tests/sdc/sanity/test1.robot +++ b/tests/sdc/sanity/test1.robot @@ -12,5 +12,6 @@ Get Requests health check ok ${resp}= Get Request sdc-fe /sdc1/rest/healthCheck headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 @{ITEMS}= Copy List ${resp.json()['componentsInfo']} - : FOR ${ELEMENT} IN @{ITEMS} - \ Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} + FOR ${ELEMENT} IN @{ITEMS} + Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} + END diff --git a/tests/sdc/sdc-helm-validator/sdc-helm-validator.robot b/tests/sdc/sdc-helm-validator/sdc-helm-validator.robot index b4051051..baa77a30 100644 --- a/tests/sdc/sdc-helm-validator/sdc-helm-validator.robot +++ b/tests/sdc/sdc-helm-validator/sdc-helm-validator.robot @@ -106,9 +106,9 @@ Verify That Sdc Helm Validator Responds With Error For Chart Validation Request ${chart_path} Catenate SEPARATOR= ${CHARTS_PATH} ${CHART_CORRECT_V2} ${files}= Create Multi Part ${chart_path} ${other_data}= Create Dictionary ${REQ_KEY_VERSION_DESIRED}=v10 - ${resp}= Post Request ${VALIDATOR_SESSION} ${VALIDATE_ENDPOINT} files=${files} data=${other_data} + ${resp}= POST On Session ${VALIDATOR_SESSION} ${VALIDATE_ENDPOINT} files=${files} data=${other_data} expected_status=anything - Should Be Equal As Strings ${resp.status_code} 400 + Status Should Be 400 ${resp} Should Be Equal As Strings ${resp.text} {"message":"Version: 10 is not supported"} Verify That Sdc Helm Validator Correctly Responds For Correct Chart Validation Request With Random Supported Version diff --git a/tests/sdc/uiSanity/test1.robot b/tests/sdc/uiSanity/test1.robot index 2b92be74..6567b51e 100644 --- a/tests/sdc/uiSanity/test1.robot +++ b/tests/sdc/uiSanity/test1.robot @@ -12,5 +12,6 @@ Get Requests health check ok ${resp}= Get Request sdc-fe /sdc1/rest/healthCheck headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 @{ITEMS}= Copy List ${resp.json()['componentsInfo']} - : FOR ${ELEMENT} IN @{ITEMS} - \ Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} + FOR ${ELEMENT} IN @{ITEMS} + Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']} + END -- 2.16.6