[CSIT] Fix SDC CSIT Run Errors/Warnings & Path Correction 85/121285/2
authormatthew-mcneilly <matthew.mcneilly@est.tech>
Wed, 12 May 2021 13:54:27 +0000 (14:54 +0100)
committermatthew-mcneilly <matthew.mcneilly@est.tech>
Wed, 12 May 2021 16:27:51 +0000 (17:27 +0100)
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 <matthew.mcneilly@est.tech>
Change-Id: Idff668b05330eaf685ab519ee2a0d7cd4fed7ceb

plans/sdc/uiSanity/testplan.txt
tests/sdc/nightly/test1.robot
tests/sdc/sanity/test1.robot
tests/sdc/sdc-helm-validator/sdc-helm-validator.robot
tests/sdc/uiSanity/test1.robot

index 9f21c69..7b0f708 100644 (file)
@@ -1,3 +1,3 @@
 # Test suites are relative paths under [integration/csit.git]/tests/.
 # Place the suites in run order.
-sdc/sanity
+sdc/uiSanity
index 2b92be7..6567b51 100644 (file)
@@ -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
index 2b92be7..6567b51 100644 (file)
@@ -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
index b405105..baa77a3 100644 (file)
@@ -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
index 2b92be7..6567b51 100644 (file)
@@ -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