aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests')
-rw-r--r--test/csit/tests/clamp/APIs/01__Create_CL_Holmes.robot2
-rw-r--r--test/csit/tests/clamp/APIs/02__Create_CL_TCA.robot2
-rw-r--r--test/csit/tests/clamp/APIs/03__VariousApis.robot6
-rw-r--r--test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot19
-rw-r--r--test/csit/tests/clamp/UIs/02__Create_TCA_model.robot19
-rw-r--r--test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot10
-rw-r--r--test/csit/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot14
-rw-r--r--test/csit/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot14
-rw-r--r--test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml4
-rw-r--r--test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py11
-rw-r--r--test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator4
-rw-r--r--test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py13
-rw-r--r--test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator4
13 files changed, 65 insertions, 57 deletions
diff --git a/test/csit/tests/clamp/APIs/01__Create_CL_Holmes.robot b/test/csit/tests/clamp/APIs/01__Create_CL_Holmes.robot
index 1f5473833..ce4c8df66 100644
--- a/test/csit/tests/clamp/APIs/01__Create_CL_Holmes.robot
+++ b/test/csit/tests/clamp/APIs/01__Create_CL_Holmes.robot
@@ -17,7 +17,7 @@ Create the sessions
*** Test Cases ***
Get Requests health check ok
Create the sessions
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/healthcheck
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
Should Be Equal As Strings ${resp.status_code} 200
Get Requests verify test template found
diff --git a/test/csit/tests/clamp/APIs/02__Create_CL_TCA.robot b/test/csit/tests/clamp/APIs/02__Create_CL_TCA.robot
index 213c231b8..87b474213 100644
--- a/test/csit/tests/clamp/APIs/02__Create_CL_TCA.robot
+++ b/test/csit/tests/clamp/APIs/02__Create_CL_TCA.robot
@@ -10,7 +10,7 @@ ${passw} password
*** Test Cases ***
Get Requests health check ok
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/healthcheck
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
Should Be Equal As Strings ${resp.status_code} 200
Get Requests verify test template found
diff --git a/test/csit/tests/clamp/APIs/03__VariousApis.robot b/test/csit/tests/clamp/APIs/03__VariousApis.robot
index 50dd78e16..f32728396 100644
--- a/test/csit/tests/clamp/APIs/03__VariousApis.robot
+++ b/test/csit/tests/clamp/APIs/03__VariousApis.robot
@@ -10,9 +10,9 @@ ${passw} password
*** Test Cases ***
Get Clamp properties
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/properties
- Dictionary Should Contain Key ${resp.json()} global
- Dictionary Should Contain Key ${resp.json()['global']} location
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/cldsInfo
+ Dictionary Should Contain Key ${resp.json()} userName
+ Dictionary Should Contain Key ${resp.json()} permissionReadCl
Get Clamp Info
${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/cldsInfo
diff --git a/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot b/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot
index c9b7d8c06..305044cb0 100644
--- a/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot
+++ b/test/csit/tests/clamp/UIs/01__Create_Holmes_model.robot
@@ -3,7 +3,7 @@ Library Collections
Library RequestsLibrary
Library OperatingSystem
Library json
-Library Selenium2Library
+Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py
Library XvfbRobot
*** Variables ***
@@ -22,19 +22,23 @@ Create the sessions
*** Test Cases ***
Get Requests health check ok
Create the sessions
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/healthcheck
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
Should Be Equal As Strings ${resp.status_code} 200
Open Browser
# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line.
Start Virtual Display 1920 1080
- Open Browser ${BASE_URL}/designer/index.html browser=firefox
Set Selenium Speed ${SELENIUM_SPEED_SLOW}
+ Open Browser ${BASE_URL}/designer/index.html browser=firefox
+
+Reply to authentication popup
+ Run Keyword And Ignore Error Insert into prompt ${login} ${passw}
+ Confirm action
+
+Good Login to Clamp UI and Verify logged in
Set Window Size 1920 1080
${title}= Get Title
Should Be Equal CLDS ${title}
-
-Good Login to Clamp UI and Verify logged in
Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60
Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin
@@ -88,8 +92,3 @@ Save Model from Menu
Close Browser
Close Browser
-
-Verify Holmes CL well created
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
- Should Contain Match ${resp} *HolmesModel1*
- Should Not Contain Match ${resp} *HolmesModel99*
diff --git a/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot
index 7ee275773..0dc0a8abb 100644
--- a/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot
+++ b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot
@@ -3,7 +3,7 @@ Library Collections
Library RequestsLibrary
Library OperatingSystem
Library json
-Library Selenium2Library
+Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py
Library XvfbRobot
*** Variables ***
@@ -15,19 +15,23 @@ ${BASE_URL} https://localhost:8443
*** Test Cases ***
Get Requests health check ok
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/healthcheck
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
Should Be Equal As Strings ${resp.status_code} 200
Open Browser
# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line.
Start Virtual Display 1920 1080
- Open Browser ${BASE_URL}/designer/index.html browser=firefox
Set Selenium Speed ${SELENIUM_SPEED_SLOW}
+ Open Browser ${BASE_URL}/designer/index.html browser=firefox
+
+Reply to authentication popup
+ Run Keyword And Ignore Error Insert into prompt ${login} ${passw}
+ Confirm action
+
+Good Login to Clamp UI and Verify logged in
Set Window Size 1920 1080
${title}= Get Title
Should Be Equal CLDS ${title}
-
-Good Login to Clamp UI and Verify logged in
Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60
Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin
@@ -88,8 +92,3 @@ Save Model from Menu
Close Browser
Close Browser
-
-Verify TCA CL well create
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
- Should Contain Match ${resp} *TCAModel1*
- Should Not Contain Match ${resp} *TCAModel99*
diff --git a/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot b/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot
index 9116964b6..1f086d178 100644
--- a/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot
+++ b/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot
@@ -9,6 +9,16 @@ ${login} admin
${passw} password
*** Test Cases ***
+Verify Holmes CL well created
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
+ Should Contain Match ${resp} *HolmesModel1*
+ Should Not Contain Match ${resp} *HolmesModel99*
+
+Verify TCA CL well create
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
+ Should Contain Match ${resp} *TCAModel1*
+ Should Not Contain Match ${resp} *TCAModel99*
+
Verify HolmesModel1
${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model/HolmesModel1
Should Contain Match ${resp} *templateHolmes1*
diff --git a/test/csit/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot b/test/csit/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot
index a6ccb9947..de10a27c5 100644
--- a/test/csit/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot
+++ b/test/csit/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot
@@ -3,7 +3,7 @@ Library Collections
Library RequestsLibrary
Library OperatingSystem
Library json
-Library Selenium2Library
+Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py
Library XvfbRobot
*** Variables ***
@@ -15,19 +15,23 @@ ${BASE_URL} https://localhost:8443
*** Test Cases ***
Get Requests health check ok
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/healthcheck
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
Should Be Equal As Strings ${resp.status_code} 200
Open Browser
# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line.
Start Virtual Display 1920 1080
- Open Browser ${BASE_URL}/designer/index.html browser=firefox
Set Selenium Speed ${SELENIUM_SPEED_SLOW}
+ Open Browser ${BASE_URL}/designer/index.html browser=firefox
+
+Reply to authentication popup
+ Run Keyword And Ignore Error Insert into prompt ${login} ${passw}
+ Confirm action
+
+Good Login to Clamp UI and Verify logged in
Set Window Size 1920 1080
${title}= Get Title
Should Be Equal CLDS ${title}
-
-Good Login to Clamp UI and Verify logged in
Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60
Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin
diff --git a/test/csit/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot b/test/csit/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot
index 6330ead92..2b95530ae 100644
--- a/test/csit/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot
+++ b/test/csit/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot
@@ -3,7 +3,7 @@ Library Collections
Library RequestsLibrary
Library OperatingSystem
Library json
-Library Selenium2Library
+Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py
Library XvfbRobot
*** Variables ***
@@ -15,19 +15,23 @@ ${BASE_URL} https://localhost:8443
*** Test Cases ***
Get Requests health check ok
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/healthcheck
+ ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
Should Be Equal As Strings ${resp.status_code} 200
Open Browser
# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line.
Start Virtual Display 1920 1080
- Open Browser ${BASE_URL}/designer/index.html browser=firefox
Set Selenium Speed ${SELENIUM_SPEED_SLOW}
+ Open Browser ${BASE_URL}/designer/index.html browser=firefox
+
+Reply to authentication popup
+ Run Keyword And Ignore Error Insert into prompt ${login} ${passw}
+ Confirm action
+
+Good Login to Clamp UI and Verify logged in
Set Window Size 1920 1080
${title}= Get Title
Should Be Equal CLDS ${title}
-
-Good Login to Clamp UI and Verify logged in
Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60
Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin
diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
index 3cac3b41b..b1f84fda2 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
@@ -25,8 +25,6 @@ services:
build:
context: simulator
dockerfile: DMaaP_simulator
- args:
- - https_proxy=${HTTPS_PROXY}
ports:
- "2222:2222"
container_name: dmaap_simulator
@@ -35,8 +33,6 @@ services:
build:
context: simulator
dockerfile: AAI_simulator
- args:
- - https_proxy=${HTTPS_PROXY}
ports:
- "3333:3333"
container_name: aai_simulator
diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index ca8bdd1f6..e70d8d30f 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -1,11 +1,12 @@
-import BaseHTTPServer
+from http.server import BaseHTTPRequestHandler
+from http.server import HTTPServer
import re
import sys
pnfs = 'Empty'
-class AAIHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+class AAIHandler(BaseHTTPRequestHandler):
def do_PUT(self):
if re.search('/set_pnfs', self.path):
global pnfs
@@ -16,7 +17,7 @@ class AAIHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return
def do_PATCH(self):
- pnfs_name = '/aai/v12/network/pnfs/pnf/' + pnfs
+ pnfs_name = '/aai/v12/network/pnfs/pnf/' + pnfs.decode()
if re.search('wrong_aai_record', self.path):
self.send_response(400)
self.end_headers()
@@ -33,7 +34,7 @@ def _header_200_and_json(self):
self.end_headers()
-def _main_(handler_class=AAIHandler, server_class=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
+def _main_(handler_class=AAIHandler, server_class=HTTPServer, protocol="HTTP/1.0"):
if sys.argv[1:]:
port = int(sys.argv[1])
@@ -46,7 +47,7 @@ def _main_(handler_class=AAIHandler, server_class=BaseHTTPServer.HTTPServer, pro
httpd = server_class(server_address, handler_class)
sa = httpd.socket.getsockname()
- print "Serving HTTP on", sa[0], "port", sa[1], "..."
+ print("Serving HTTP on", sa[0], "port", sa[1], "...")
httpd.serve_forever()
diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator
index 9566c47a9..013cd0a65 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator
@@ -1,9 +1,7 @@
-FROM python:2
+FROM python:3
ADD AAI.py /
-RUN pip install robotframework
-
EXPOSE 3333
CMD [ "python", "./AAI.py" ]
diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
index dd2d19451..210378421 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
@@ -1,12 +1,13 @@
-import BaseHTTPServer
+from http.server import BaseHTTPRequestHandler
+from http.server import HTTPServer
import re
import sys
-posted_event_from_prh = 'Empty'
+posted_event_from_prh = b'Empty'
received_event_to_get_method = 'Empty'
-class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+class DMaaPHandler(BaseHTTPRequestHandler):
def do_PUT(self):
if re.search('/set_get_event', self.path):
global received_event_to_get_method
@@ -29,11 +30,9 @@ class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
if re.search('/events/unauthenticated.SEC_OTHER_OUTPUT/OpenDcae-c12/c12', self.path):
_header_200_and_json(self)
self.wfile.write(received_event_to_get_method)
- self.wfile.close()
elif re.search('/events/pnfReady', self.path):
_header_200_and_json(self)
self.wfile.write(posted_event_from_prh)
- self.wfile.close()
return
@@ -44,7 +43,7 @@ def _header_200_and_json(self):
self.end_headers()
-def _main_(handler_class=DMaaPHandler, server_class=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
+def _main_(handler_class=DMaaPHandler, server_class=HTTPServer, protocol="HTTP/1.0"):
if sys.argv[1:]:
port = int(sys.argv[1])
@@ -57,7 +56,7 @@ def _main_(handler_class=DMaaPHandler, server_class=BaseHTTPServer.HTTPServer, p
httpd = server_class(server_address, handler_class)
sa = httpd.socket.getsockname()
- print "Serving HTTP on", sa[0], "port", sa[1], "..."
+ print("Serving HTTP on", sa[0], "port", sa[1], "...")
httpd.serve_forever()
diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator
index 20761e7e8..cf4160c89 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator
@@ -1,9 +1,7 @@
-FROM python:2
+FROM python:3
ADD DMaaP.py /
-RUN pip install robotframework
-
EXPOSE 2222
CMD [ "python", "./DMaaP.py" ]