aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot')
-rwxr-xr-xrobot/assets/keys/org.onap.clamp.cert.pem60
-rwxr-xr-xrobot/assets/keys/org.onap.clamp.key.clear.pem27
-rw-r--r--robot/resources/clamp_interface.robot33
-rw-r--r--robot/testsuites/clamp.robot12
4 files changed, 128 insertions, 4 deletions
diff --git a/robot/assets/keys/org.onap.clamp.cert.pem b/robot/assets/keys/org.onap.clamp.cert.pem
new file mode 100755
index 00000000..09dc57cd
--- /dev/null
+++ b/robot/assets/keys/org.onap.clamp.cert.pem
@@ -0,0 +1,60 @@
+Bag Attributes
+ localKeyID: A9 72 E9 4A 4F 99 8B BE 47 F9 D7 B4 0A DA 99 D3 C5 FA DB C7
+ friendlyName: clamp@clamp.onap.org
+subject=/C=US/O=ONAP/OU=clamp@clamp.onap.org/OU=OSAAF/CN=clamp
+issuer=/C=US/O=ONAP/OU=OSAAF/CN=intermediateCA_1
+-----BEGIN CERTIFICATE-----
+MIIEUDCCAzigAwIBAgIBCDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJVUzEN
+MAsGA1UECgwET05BUDEOMAwGA1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVk
+aWF0ZUNBXzEwHhcNMTgwNjA1MTUzODMzWhcNMTkwNTMxMTUzODMzWjBbMQswCQYD
+VQQGEwJVUzENMAsGA1UECgwET05BUDEdMBsGA1UECwwUY2xhbXBAY2xhbXAub25h
+cC5vcmcxDjAMBgNVBAsMBU9TQUFGMQ4wDAYDVQQDDAVjbGFtcDCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBALrLxrZli4TIvaYBC1JpJ+tk1nKTEKUMqBig
+v/zG3AewFCZsBhHid9yC+AglPWBMoSwhA4k+CZjc8pkt9sgdnQrdy43zKluRtscA
+c1YldcUBTO1bQx4duhU3tAJTaZZgpTMqfMuxvFTdBEe1bBcHv3HI/eaqk8haNpEV
+HT0BF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5E2vxrBR9T1v3kVvlt6+PSF
+BoHXROk5HQmdHxnH+VYQtDHSwj9Xe9aoJMyL0WjYKd//8NUO+VACDOtK4Nia6gy9
+m/n9kMASMw6f9iF4n6t4902RWrRKTYM1CVu5wyVklVbEdE9i6Db4CpL9E8HpBUAP
+t44JiNzuFkDmSE/z5XuQIimDt6nzOaSF8pX2KHY2ICDLwpMNUvxzqXD9ECbdspiy
+JC2RGq8uARGGl6kQQBKDNO8SrO7rSBPANd1+LgqrKbCrHYfvFgkZPgT5MlQi+E1G
+LNT+i6fzZha9ed/L6yjl5Em71flJGFwRZl2pfErZRxp8pLPcznYyIpSjcwnqNCRC
+orhlp8nheiODC3oO3AFHDiFgUqvm8hgpnT2cPk2lpU2VY1TcZ8sW5qUDCxINIPcW
+u1SAsa87IJK3vEzPZfTCs/S6XThoqRfXj0c0Rahj7YFRi/PqIPY0ejwdtmZ9m9pZ
+8Lb0GYmlo44=
+-----END CERTIFICATE-----
diff --git a/robot/assets/keys/org.onap.clamp.key.clear.pem b/robot/assets/keys/org.onap.clamp.key.clear.pem
new file mode 100755
index 00000000..5a1e9f7a
--- /dev/null
+++ b/robot/assets/keys/org.onap.clamp.key.clear.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAusvGtmWLhMi9pgELUmkn62TWcpMQpQyoGKC//MbcB7AUJmwG
+EeJ33IL4CCU9YEyhLCEDiT4JmNzymS32yB2dCt3LjfMqW5G2xwBzViV1xQFM7VtD
+Hh26FTe0AlNplmClMyp8y7G8VN0ER7VsFwe/ccj95qqTyFo2kRUdPQEXXHSO+bbW
+HVIXsCOe2QXTAHb15QCK/SSrjViB6lXgruTXuRNDfGCuBBWEcnawsleL9ZG17Y3p
+k88XepteZYrAnUvhpPXQKCqvP3t8uQGAFipdiCgdS5EILXTlEdfUmFVLMrfkBgJj
+ev/GMH+hiTT957goh/rAwjyXgZUQWOtSW5tsCQIDAQABAoIBAGzeHy5m+G2n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j7Gi0qrFTgvzA5iWaknLsD669EAx57EkLWI9x34KgjvlDQtXp
+iK23IKgW5B2rYTLBL89tjHWvWd0OQSorBm6M31kRJVQ/Jmwny83t1bjOd+Ne9/Zi
+tn3cpAyR65esZpPsYDNraCNW9gHOkfwH02bqBohh8r0Pb77hAsz3XJg=
+-----END RSA PRIVATE KEY-----
diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot
index 0adabd73..29365c0c 100644
--- a/robot/resources/clamp_interface.robot
+++ b/robot/resources/clamp_interface.robot
@@ -7,19 +7,44 @@ Resource global_properties.robot
*** Variables ***
${CLAMP_HEALTH_CHECK_PATH} /restservices/clds/v1/healthcheck
${CLAMP_ENDPOINT} ${GLOBAL_CLAMP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLAMP_IP_ADDR}:${GLOBAL_CLAMP_SERVER_PORT}
+${CLAMP_BASE_PATH} /restservices/clds/v1
+${CLAMP_CLIENT_KEY} robot/assets/keys/org.onap.clamp.key.clear.pem
+${CLAMP_CLIENT_CERT} robot/assets/keys/org.onap.clamp.cert.pem
*** Keywords ***
+Run CLAMP Get Control Loop
+ [Documentation] runs CLAMP Open Control Loop based on model name
+ [Arguments] ${model_name}
+ ${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model-names
+ ${resp}= Run Clamp HTTPS Get Request ${data_path}
+
+Run CLAMP Get Model Names
+ [Documentation] runs CLAMP Get Model Names
+ ${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model-names
+ ${resp}= Run Clamp HTTPS Get Request ${data_path}
+
Run CLAMP Health Check
[Documentation] Runs CLAMP Health check
${resp}= Run CLAMP Get Request ${CLAMP_HEALTH_CHECK_PATH}
- Should Be Equal As Integers ${resp.status_code} 200
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Run CLAMP HTTPS Get Request
+ [Documentation] Runs CLAMP HTTPS Get request
+ [Arguments] ${data_path}
+ @{client_certs}= Create List ${CLAMP_CLIENT_CERT} ${CLAMP_CLIENT_KEY}
+ ${session}= Create Client Cert Session session ${CLAMP_ENDPOINT} client_certs=@{client_certs}
+ ${resp}= Get Request session ${data_path}
+ Should Be Equal As Integers ${resp.status_code} 200
+ Log Received response from CLAMP ${resp.text}
+ [Return] ${resp}
Run CLAMP Get Request
[Documentation] Runs CLAMP Get request
[Arguments] ${data_path}
- ${session}= Create Session session ${CLAMP_ENDPOINT}
- ${resp}= Get Request session ${data_path}
- Should Be Equal As Integers ${resp.status_code} 200
+ ${session}= Create Session session ${CLAMP_ENDPOINT}
+ ${resp}= Get Request session ${data_path}
+ Should Be Equal As Integers ${resp.status_code} 200
Log Received response from CLAMP ${resp.text}
[Return] ${resp}
+
diff --git a/robot/testsuites/clamp.robot b/robot/testsuites/clamp.robot
new file mode 100644
index 00000000..cd85dc68
--- /dev/null
+++ b/robot/testsuites/clamp.robot
@@ -0,0 +1,12 @@
+*** Settings ***
+Documentation Testing CLAMP
+...
+... Testing ecomp components are available via calls.
+Test Timeout 10 second
+Resource ../resources/clamp_interface.robot
+
+*** Test Cases ***
+Basic CLAMP Health Check
+ [Tags] clamp
+ Run CLAMP Get Model Names
+