Update deprecated Request syntax in testsuite 67/140367/4
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 4 Mar 2025 11:08:17 +0000 (12:08 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Sun, 9 Mar 2025 09:57:05 +0000 (10:57 +0100)
- replace '[Get,Post,Put,Delete] Request' with '[...] On Session'
- declare mod_openssl module for the lighttpd server to address
  startup warning in the pod

Issue-ID: INT-2299
Change-Id: I13343390a2fd275275d39ce963333f94708e9999
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
docker/lighttpd.conf
requirements.txt
robot/resources/aaf_interface.robot
robot/resources/cds_interface.robot
robot/resources/clamp_interface.robot
robot/resources/cli_interface.robot
robot/resources/policy_interface.robot

index 7fc50db..b9d203c 100644 (file)
@@ -26,6 +26,7 @@ index-file.names = ( "index.html" )
 server.modules += ( "mod_auth" )
 server.modules += ( "mod_alias" )
 server.modules += ( "mod_compress" )
+server.modules += ( "mod_openssl" )
 auth.debug = 2
 auth.backend = "plain"
 auth.backend.plain.userfile = "/etc/lighttpd/authorization"
index 9129ced..f6c147e 100644 (file)
@@ -1,8 +1,10 @@
 --extra-index-url https://nexus3.onap.org/repository/PyPi.staging/simple
 robotframework==3.2.2
 pyrsistent==0.16.1
-selenium
-robotframework-seleniumlibrary==5.1.0
+# last version to work with chrome_options
+# https://github.com/SeleniumHQ/selenium/commit/9f5801c82fb3be3d5850707c46c3f8176e3ccd8e
+selenium==4.9.1
+robotframework-seleniumlibrary==4.9.1
 robotframework-archivelibrary
 robotframework-sshlibrary
 robotframework-httplibrary
index 28da33d..5cf223e 100644 (file)
@@ -21,6 +21,6 @@ Run AAF Get Request
      ${session}=    Create Session     aaf     ${GLOBAL_AAF_SERVER}    auth=${GLOBAL_AAF_AUTHENTICATION}
      ${uuid}=    Generate UUID4
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
-     ${resp}=  Get Request     aaf     ${data_path}     headers=${headers}
+     ${resp}=  GET On Session  aaf     ${data_path}     headers=${headers}
      Log    Received response from aaf ${resp.text}
      [Return]    ${resp}
index 358ef64..73e7dd7 100644 (file)
@@ -7,8 +7,8 @@ Library           OperatingSystem
 Library           String
 
 *** Variables ***
-${CDS_HEALTH_CHECK_PATH}    /api/v1/execution-service/health-check
 ${CDS_HEALTH_ENDPOINT}     ${GLOBAL_CCSDK_CDS_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CCSDK_CDS_BLUEPRINT_PROCESSOR_IP_ADDR}:${GLOBAL_CCSDK_CDS_HEALTH_SERVER_PORT}
+${CDS_HEALTH_CHECK_PATH}                             /api/v1/execution-service/health-check
 ${CDS_CREATE_DATA_DICTIONARY_ENDPOINT}               /api/v1/dictionary/definition
 ${CDS_RETRIEVE_DATA_DICTIONARY_ENDPOINT}             /api/v1/dictionary/search/
 ${CDS_BOOTSTRAP_ENDPOINT}                            /api/v1/blueprint-model/bootstrap
@@ -30,7 +30,7 @@ Run CDS Basic Health Check
     ${auth}=  Create List  ${GLOBAL_CCSDK_CDS_USERNAME}    ${GLOBAL_CCSDK_CDS_PASSWORD}
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${headers}=  Create Dictionary    Accept=application/json    Content-Type=application/json
-    ${resp}=    Get Request     cds    ${CDS_HEALTH_CHECK_PATH}     headers=${headers}
+    ${resp}=    GET On Session     cds    ${CDS_HEALTH_CHECK_PATH}     headers=${headers}
     Log    Received response code from cds ${resp}
     Log    Received content from cds ${resp.content}
     Should Be Equal As Strings  ${resp.status_code}     200
@@ -41,7 +41,7 @@ Run CDS Create Data Dictionary Health Check
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${headers}=  Create Dictionary    Accept=application/json    Content-Type=application/json
     ${json}      Get Binary File          ${CREATE_DICTIONARY_JSON_PATH}
-    ${resp}=    Post Request     cds    ${CDS_CREATE_DATA_DICTIONARY_ENDPOINT}        data=${json}              headers=${headers}
+    ${resp}=    POST On Session     cds    ${CDS_CREATE_DATA_DICTIONARY_ENDPOINT}        data=${json}              headers=${headers}
     Log    Received response code from cds ${resp}
     Log    Received content from cds ${resp.content}
     Should Be Equal As Strings  ${resp.status_code}     200
@@ -51,7 +51,7 @@ Run CDS GET Data Dictionary Health Check
     ${auth}=  Create List  ${GLOBAL_CCSDK_CDS_USERNAME}    ${GLOBAL_CCSDK_CDS_PASSWORD}
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${headers}=  Create Dictionary    Accept=application/json    Content-Type=application/json
-    ${resp}=    Get Request     cds    ${CDS_RETRIEVE_DATA_DICTIONARY_ENDPOINT}${CDS_CD_TAG}     headers=${headers}
+    ${resp}=    GET On Session     cds    ${CDS_RETRIEVE_DATA_DICTIONARY_ENDPOINT}${CDS_CD_TAG}     headers=${headers}
     Log    Received response code from cds ${resp}
     Log    Received content from cds ${resp.content}
     Should Be Equal As Strings  ${resp.status_code}     200
@@ -64,7 +64,7 @@ Run CDS Bootstrap Health Check
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${headers}=  Create Dictionary    Accept=application/json    Content-Type=application/json
     ${json_bootstrap}      Get Binary File          ${BOOTSTRAP_JSON_PATH}
-    ${resp}=    Post Request     cds    ${CDS_BOOTSTRAP_ENDPOINT}        data=${json_bootstrap}              headers=${headers}
+    ${resp}=    POST On Session     cds    ${CDS_BOOTSTRAP_ENDPOINT}        data=${json_bootstrap}              headers=${headers}
     Log    Received response code from cds ${resp}
     Log    Received content from cds ${resp.content}
     Should Be Equal As Strings  ${resp.status_code}     200
@@ -75,7 +75,7 @@ Run CDS Enrich CBA Health Check
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${data}=   Get Binary File         ${CDS_CBA_PACKAGE_FILE}
     ${file}=   Create Dictionary       file=${data}
-    ${resp}=    Post Request   cds    ${CDS_CBA_ENRICH_ENDPOINT}    files=${file}
+    ${resp}=    POST On Session   cds    ${CDS_CBA_ENRICH_ENDPOINT}    files=${file}
     Should Be Equal As Strings  ${resp.status_code}    200
     Create File    ${CDS_CBA_ENRICHED_FILE}    ${resp.text}    encoding=ISO-8859-1
 
@@ -85,7 +85,7 @@ Run CDS Publish CBA Health Check
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${data}=   Get Binary File    ${CDS_CBA_ENRICHED_FILE}
     ${file}=   Create Dictionary       file=${data}
-    ${resp}=    Post Request   cds    ${CDS_CBA_PUBLISH_ENDPOINT}    files=${file}
+    ${resp}=    POST On Session   cds    ${CDS_CBA_PUBLISH_ENDPOINT}    files=${file}
     Should Be Equal As Strings  ${resp.status_code}    200      And    ${resp.json()['blueprintModel']['id']}!= ${NONE}
     Set Global Variable    ${blueprintModel}    ${resp.json()['blueprintModel']['id']}
 
@@ -95,7 +95,7 @@ Run CDS Process CBA Health Check
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${headers}=  Create Dictionary    Accept=*/*        Content-Type=application/json
     ${file}    Get Binary File                  ${CDS_CBA_PROCESS_FILE_PATH}
-    ${resp}=    Post Request   cds    ${CDS_CBA_PROCESS_API_ENDPOINT}    data=${file}   headers=${headers}
+    ${resp}=    POST On Session   cds    ${CDS_CBA_PROCESS_API_ENDPOINT}    data=${file}   headers=${headers}
     Should Be Equal As Strings  ${resp.status_code}    200
     Should Be Equal As Strings  ${resp.json()['status']['eventType']}   ${SUCCESS}
 
@@ -104,5 +104,5 @@ Run CDS Delete CBA Health Check
     ${auth}=  Create List  ${GLOBAL_CCSDK_CDS_USERNAME}       ${GLOBAL_CCSDK_CDS_PASSWORD}
     ${session}=    Create Session       cds    ${CDS_HEALTH_ENDPOINT}    auth=${auth}
     ${headers}=    Create Dictionary    Accept=*/*    Content-Type=application/json
-    ${resp}=    Delete Request   cds    ${CDS_CBA_DELETE_ENDPOINT}${blueprintModel}       headers=${headers}
+    ${resp}=    DELETE On Session   cds    ${CDS_CBA_DELETE_ENDPOINT}${blueprintModel}       headers=${headers}
     Should Be Equal As Strings  ${resp.status_code}    200
index fe59232..bf236a7 100644 (file)
@@ -103,7 +103,7 @@ Run CLAMP Get Request
      [Documentation]    Runs CLAMP Get request
      [Arguments]    ${data_path}
      ${session}=    Create Session      session         ${CLAMP_ENDPOINT}
-     ${resp}=   Get Request     session         ${data_path}
+     ${resp}=   GET On Session     session         ${data_path}
      Should Be Equal As Integers        ${resp.status_code}     200
      Log    Received response from CLAMP ${resp.text}
      [Return]    ${resp}
index 01178f0..5d52c00 100644 (file)
@@ -18,7 +18,6 @@ Run CLI Get Request
      [Documentation]    Runs CLI Get request
      [Arguments]    ${data_path}
      ${session}=    Create Session    cli    ${CLI_ENDPOINT}
-     ${resp}=     Get Request     cli     ${data_path}
+     ${resp}=     GET On Session     cli     ${data_path}
      Log    Received response from CLI ${resp.text}
      [Return]    ${resp}
-
index 8e87085..2296265 100644 (file)
@@ -38,7 +38,7 @@ Run Policy Health Check
      Log    Creating session ${POLICY_NEW_HEALTHCHECK_ENDPOINT}
      ${session}=    Create Session  policy  ${POLICY_NEW_HEALTHCHECK_ENDPOINT}   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Get Request   policy  ${POLICY_NEW_HEALTHCHECK_PATH}    headers=${headers}
+     ${resp}=   GET On Session   policy  ${POLICY_NEW_HEALTHCHECK_PATH}    headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings   ${resp.status_code}   200
      Should Be True   ${resp.json()['healthy']}
@@ -50,7 +50,7 @@ Run Policy Pap Get Request
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=  Get Request     policy   ${data_path}     headers=${headers}
+     ${resp}=  GET On Session  policy   ${data_path}     headers=${headers}
      Log    Received response from Policy Pap ${resp.text}
      [Return]   ${resp}
 
@@ -61,7 +61,7 @@ Run Policy Api Get Request
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=  Get Request     policy   ${data_path}     headers=${headers}
+     ${resp}=  GET On Session  policy   ${data_path}     headers=${headers}
      Log    Received response from policy API ${resp.text}
      [Return]    ${resp}
 
@@ -72,7 +72,7 @@ Run Policy Api Post Request
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=  Post Request    policy   ${data_path}     data=${data}    headers=${headers}
+     ${resp}=  POST On Session         policy   ${data_path}     data=${data}    headers=${headers}
      Log    Received response from policy ${resp.text}
      [Return]    ${resp}
 
@@ -83,7 +83,7 @@ Run Policy Pap Post Request
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=  Post Request    policy   ${data_path}     data=${data}    headers=${headers}
+     ${resp}=  POST On Session         policy   ${data_path}     data=${data}    headers=${headers}
      Log    Received response from policy ${resp.text}
      [Return]    ${resp}
 
@@ -94,7 +94,7 @@ Undeploy Policy
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request     policy  /policy/pap/v1/pdps/policies/${policy_name}     headers=${headers}
+     ${resp}=   DELETE On Session     policy  /policy/pap/v1/pdps/policies/${policy_name}     headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     202
 
@@ -165,7 +165,7 @@ Run Create Policy Post Request
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
      ${json_policy}      Get Binary File          ${json_path_policy}create_policy.json
-     ${resp}=   Post Request    policy   ${POLICY_CREATE_POLICY_URI}     data=${json_policy}    headers=${headers}
+     ${resp}=   POST On Session    policy   ${POLICY_CREATE_POLICY_URI}     data=${json_policy}    headers=${headers}
      Log    Received response from policy ${resp.text}
      [Return]    ${resp}
      Should Be Equal As Strings    ${resp.status_code}     201
@@ -177,7 +177,7 @@ Run Get Policy Get Request
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Get Request    policy   ${POLICY_GET_POLICY_URI}     headers=${headers}
+     ${resp}=   GET On Session    policy   ${POLICY_GET_POLICY_URI}     headers=${headers}    expected_status=any
      Log    Received response from policy ${resp.text}
      [Return]    ${resp}
 
@@ -189,7 +189,7 @@ Run Deploy Policy Pap Post Request
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
      ${json_deploy}     Get Binary File          ${json_path_policy}deploy_policy.json
-     ${resp}=   Post Request    policy   /policy/pap/v1/pdps/policies     data=${json_deploy}    headers=${headers}
+     ${resp}=   POST On Session    policy   /policy/pap/v1/pdps/policies     data=${json_deploy}    headers=${headers}
      Log    Received response from policy ${resp.text}
      [Return]    ${resp}
      Should Be Equal As Strings    ${resp.status_code}     202
@@ -201,7 +201,7 @@ Run Undeploy Policy
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request     policy  /policy/pap/v1/pdps/policies/operational.modifyconfig     headers=${headers}
+     ${resp}=   DELETE On Session     policy  /policy/pap/v1/pdps/policies/operational.modifyconfig     headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     202
 
@@ -212,7 +212,7 @@ Run Undeploy vFW Monitoring Policy
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request     policy  /policy/pap/v1/pdps/policies/onap.vfirewall.tca     headers=${headers}
+     ${resp}=   DELETE On Session     policy  /policy/pap/v1/pdps/policies/onap.vfirewall.tca     headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     202
 
@@ -224,7 +224,7 @@ Run Delete vFW Monitoring Policy
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request     policy   /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.vfirewall.tca/versions/1.0.0   headers=${headers}
+     ${resp}=   DELETE On Session     policy   /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.vfirewall.tca/versions/1.0.0   headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
 
@@ -235,7 +235,7 @@ Run Delete vFW Operational Policy
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request     policy   /policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0     headers=${headers}
+     ${resp}=   DELETE On Session     policy   /policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0     headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
 
@@ -246,7 +246,7 @@ Run Delete Policy Request
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=   Delete Request  policy  ${POLICY_GET_POLICY_URI}    headers=${headers}
+     ${resp}=   DELETE On Session  policy  ${POLICY_GET_POLICY_URI}    headers=${headers}
      Log    Received response from policy ${resp.text}
      [Return]    ${resp}
      Should Be Equal As Strings    ${resp.status_code}     200
@@ -257,7 +257,7 @@ Run Policy Deployment Verification
      ${session}=    Create Session      policy  ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}   auth=${auth}
      Log    Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp_deployed_policy}=    Get Request    policy    ${POLICY_PAP_STATUS_QUERY}    headers=${headers}
+     ${resp_deployed_policy}=    GET On Session    policy    ${POLICY_PAP_STATUS_QUERY}    headers=${headers}
      Log    Received response from policy status ${resp_deployed_policy.text}
      Return From Keyword If   ${resp_deployed_policy.status_code}==404
      Should Be Equal As Strings   ${resp_deployed_policy.status_code}   200