aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py18
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py28
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot13
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot4
-rw-r--r--tests/sdc-workflow-d/__init__.robot2
-rw-r--r--tests/sdc-workflow-d/global_properties.robot43
-rw-r--r--tests/sdc-workflow-d/test1.robot112
7 files changed, 198 insertions, 22 deletions
diff --git a/tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py b/tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py
deleted file mode 100644
index e18ca12c..00000000
--- a/tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py
+++ /dev/null
@@ -1,18 +0,0 @@
-
-import jks
-
-class JksTruststoreValidator:
-
- def get_truststore(self, truststore_path, password_path):
- truststore = jks.KeyStore.load(truststore_path, open(password_path, 'rb').read())
- return truststore.certs
-
- def assert_jks_truststores_equal(self, result_truststore_path, password_path, expected_truststore_path):
- result_certs = self.get_truststore(result_truststore_path, password_path)
- expected_certs = self.get_truststore(expected_truststore_path, password_path)
- if len(result_certs) != len(expected_certs):
- return False
- for k in result_certs:
- if not (k in expected_certs and result_certs[k].cert == expected_certs[k].cert):
- return False
- return True
diff --git a/tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py b/tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py
new file mode 100644
index 00000000..983f66bb
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py
@@ -0,0 +1,28 @@
+
+import jks
+
+class JksValidator:
+
+ def get_jks_entries(self, jks_path, password_path):
+ store = jks.KeyStore.load(jks_path, open(password_path, 'rb').read())
+ return store.entries
+
+ def assert_jks_truststores_equal(self, result_truststore_path, password_path, expected_truststore_path):
+ result_keys = self.get_jks_entries(result_truststore_path, password_path)
+ expected_keys = self.get_jks_entries(expected_truststore_path, password_path)
+ if len(result_keys) != len(expected_keys):
+ return False
+ for k in result_keys:
+ if not (k in expected_keys and result_keys[k].cert == expected_keys[k].cert):
+ return False
+ return True
+
+ def assert_jks_keystores_equal(self, result_keystore_path, password_path, expected_keystore_path):
+ result_keys = self.get_jks_entries(result_keystore_path, password_path)
+ expected_keys = self.get_jks_entries(expected_keystore_path, password_path)
+ if len(result_keys) != len(expected_keys):
+ return False
+ for k in result_keys:
+ if not (k in expected_keys and result_keys[k].pkey == expected_keys[k].pkey):
+ return False
+ return True
diff --git a/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot
index 5aba7fea..416ce610 100644
--- a/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot
+++ b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot
@@ -3,7 +3,7 @@
Resource ../../../common.robot
Resource ./trust-merger-properties.robot
Library ../libraries/TrustMergerManager.py ${MOUNT_PATH} ${TRUSTSTORES_PATH}
-Library ../libraries/JksTruststoreValidator.py
+Library ../libraries/JksValidator.py
Library ../libraries/PemTruststoreValidator.py
*** Keywords ***
@@ -16,7 +16,7 @@ Run Trust Merger And Expect Error
Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
Run Trust Merger And Merge Truststore Files To Jks
- [Documentation] Run Truststore Merger Container And Validate Exit Code And Files
+ [Documentation] Run Truststore Merger Container And Validate Exit Code And Provided Truststore Files
[Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path}
${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
${files_equal}= Assert Jks Truststores Equal ${jks_path} ${jks_password} ${expected_jks_path}
@@ -24,6 +24,15 @@ Run Trust Merger And Merge Truststore Files To Jks
Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
Should Be True ${files_equal}
+Run Trust Merger And Check Copied Keystore Files
+ [Documentation] Run Truststore Merger Container And Validate Exit Code And Provided Keystore Files
+ [Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path}
+ ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
+ ${files_equal}= Assert Jks Keystores Equal ${jks_path} ${jks_password} ${expected_jks_path}
+ Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+ Should Be True ${files_equal}
+
Run Trust Merger And Merge Truststore Files To Pem
[Documentation] Run Truststore Merger Container And Validate Exit Code And Files
[Arguments] ${env_file} ${expected_exit_code} ${pem_path} ${expected_pem_path}
diff --git a/tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot b/tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot
index f954c3ac..41e55cf5 100644
--- a/tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot
+++ b/tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot
@@ -79,10 +79,10 @@ Trust Merger fails when only one extra optional env is set
Trust Merger's Copier successfully backs up files
[Tags] OOM-TRUST-STORE-MERGER
[Documentation] Run with valid env file and expect successfully backed up file
- Run Trust Merger And Merge Truststore Files To Jks ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKSBAK_KEYSTORE_EXPECTED_PATH}
+ Run Trust Merger And Check Copied Keystore Files ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKSBAK_KEYSTORE_EXPECTED_PATH}
Trust Merger's Copier successfully copies file
[Tags] OOM-TRUST-STORE-MERGER
[Documentation] Run with valid env file and expect successfully copied file
- Run Trust Merger And Merge Truststore Files To Jks ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKS_KEYSTORE_EXPECTED_PATH}
+ Run Trust Merger And Check Copied Keystore Files ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKS_KEYSTORE_EXPECTED_PATH}
diff --git a/tests/sdc-workflow-d/__init__.robot b/tests/sdc-workflow-d/__init__.robot
new file mode 100644
index 00000000..0ee6767d
--- /dev/null
+++ b/tests/sdc-workflow-d/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation sdc-workflow-D
diff --git a/tests/sdc-workflow-d/global_properties.robot b/tests/sdc-workflow-d/global_properties.robot
new file mode 100644
index 00000000..03de4c41
--- /dev/null
+++ b/tests/sdc-workflow-d/global_properties.robot
@@ -0,0 +1,43 @@
+*** Settings ***
+Documentation store all properties that can change or are used in multiple places here
+... format is all caps with underscores between words and prepended with GLOBAL
+... make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
+
+
+*** Variables ***
+${GLOBAL_APPLICATION_ID} robot-ete
+${GLOBAL_SO_STATUS_PATH} /onap/so/infra/orchestrationRequests/v6/
+${GLOBAL_SELENIUM_BROWSER} chrome
+${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
+${GLOBAL_SELENIUM_DELAY} 0
+${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
+${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
+${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
+${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
+${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
+${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
+${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
+${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
+${GLOBAL_OPENSTACK_STACK_DEPLOYMENT_TIMEOUT} 600s
+${GLOBAL_AAI_CLOUD_OWNER} CloudOwner
+${GLOBAL_AAI_CLOUD_OWNER_DEFINED_TYPE} OwnerType
+${GLOBAL_AAI_COMPLEX_NAME} clli1
+${GLOBAL_AAI_PHYSICAL_LOCATION_ID} clli1
+${GLOBAL_AAI_AVAILABILITY_ZONE_NAME} nova
+${GLOBAL_BUILD_NUMBER} 0
+${GLOBAL_OWNING_ENTITY_NAME} OE-Demonstration
+${GLOBAL_VID_UI_TIMEOUT_SHORT} 20s
+${GLOBAL_VID_UI_TIMEOUT_MEDIUM} 60s
+${GLOBAL_VID_UI_TIMEOUT_LONG} 120s
+${GLOBAL_AAI_INDEX_PATH} /aai/v14
+${GLOBAL_AAI_ZONE_ID} nova1
+${GLOBAL_AAI_ZONE_NAME} nova
+${GLOBAL_AAI_DESIGN_TYPE} integration
+${GLOBAL_AAI_ZONE_CONTEXT} labs
+${GLOBAL_TEMPLATE_FOLDER} robot/assets/templates
+${GLOBAL_ASSETS_FOLDER} robot/assets
+${GLOBAL_SERVICE_MAPPING_DIRECTORY} ./demo/service_mapping
+${GLOBAL_SO_HEALTH_CHECK_PATH} /manage/health
+${GLOBAL_SO_CLOUD_CONFIG_PATH} /cloudSite
+${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} so/create_cloud_config.jinja
+${GLOBAL_SO_ORCHESTRATION_REQUESTS_PATH} /onap/so/infra/orchestrationRequests/v7
diff --git a/tests/sdc-workflow-d/test1.robot b/tests/sdc-workflow-d/test1.robot
new file mode 100644
index 00000000..6217f2a9
--- /dev/null
+++ b/tests/sdc-workflow-d/test1.robot
@@ -0,0 +1,112 @@
+*** Settings ***
+Documentation This is the basic test for workflow designer
+Library RequestsLibrary
+Library Collections
+Library SeleniumLibrary
+Resource global_properties.robot
+
+*** Variables ***
+${HOMEPAGE} http://localhost:8285
+${HEADLESS} True
+
+***Keywords***
+
+Open SDC GUI
+ [Documentation] Logs in to SDC GUI
+ [Arguments] ${PATH}
+ ## Setup Browever now being managed by the test case
+ ##Setup Browser
+ Go To ${HOMEPAGE}${PATH}
+ Maximize Browser Window
+
+ # Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
+ # Log Logging in to ${SDC_FE_ENDPOINT}${PATH}
+ Wait Until Page Contains Jimmy
+ # Log Logged in to ${SDC_FE_ENDPOINT}${PATH}
+
+Setup Browser
+ [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
+ Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
+ Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
+ Log Running with ${GLOBAL_SELENIUM_BROWSER}
+
+Setup Browser Firefox
+ ${caps}= Evaluate sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX sys
+ Set To Dictionary ${caps} marionette=
+ Set To Dictionary ${caps} elementScrollBehavior 1
+ ${wd}= Create WebDriver Firefox capabilities=${caps}
+ Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${caps}
+
+
+Setup Browser Chrome
+ ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
+ Call Method ${chrome options} add_argument no-sandbox
+ Call Method ${chrome options} add_argument ignore-certificate-errors
+ Run Keyword If ${HEADLESS}==True Call Method ${chrome options} add_argument headless
+ ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
+ Set To Dictionary ${dc} elementScrollBehavior 1
+ Set To Dictionary ${dc} ACCEPT_SSL_CERTS True
+ Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
+ Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
+
+Input Username
+ [Arguments] ${username}
+ Input Text name=userId ${username}
+
+Input Password
+ [Arguments] ${password}
+ Input Text name=password ${password}
+
+Input Name
+ [Arguments] ${workflowName}
+ Input Text id=workflowName ${workflowName}
+
+Input Description
+ [Arguments] ${description}
+ Input Text xpath=/html/body/div[2]/div/div[2]/div/form/div/div[1]/div[2]/div/textarea ${description}
+
+Input WFdescription
+ [Arguments] ${description}
+ Input Text xpath=//*[@id="root"]/div[1]/div/div[2]/div[2]/div/div[1]/div/textarea
+
+Submit Login Button
+ Click Element xpath=/html/body/form/input[3]
+
+Submit WorkFlow Button
+ Click Element xpath=/html/body/div/home-page/div/top-nav/nav/ul/li[5]/a
+
+Add WorkFlow
+ Click Element xpath=//*[@id="root"]/div[1]/div/div[2]/div/div[2]/div[1]
+ # Click Element xpath=//*[@id="root"]/div[1]/div/div[2]/div/div[2]/div[1]/div[1]/div/svg
+
+Create Workflow
+ Click Element xpath=/html/body/div[2]/div/div[2]/div/form/div/div[2]/button[1]
+
+Goto Frame
+ Select Frame xpath=/html/body/div/plugin-tab-view/div/plugin-frame/div/div/iframe
+
+Save WorkFlow
+ Click Element xpath=//*[@id="root"]/div[1]/div/div[1]/div[2]/div[2]/div/div/div[2]/div/div/span
+
+*** Test Cases ***
+Workflow Designer Testing
+ [Documentation] User can homepage and see the tag line
+ Setup Browser
+ Open SDC GUI /login
+ Input Username cs0008
+ Input Password 123123a
+ Submit Login Button
+ Wait Until Page Contains WORKFLOW
+ Submit WorkFlow Button
+ BuiltIn.Sleep 5s
+ Goto Frame
+ Add WorkFlow
+ BuiltIn.Sleep 5s
+ Input Name testing7
+ Input Description first test through selenium
+ Create Workflow
+ # Wait Until Page Contains General
+ # Input Description2 write some dummy description
+ # Save WorkFlow
+ # BuiltIn.Sleep 5s
+ Close Browser \ No newline at end of file