Trento test lib
Copyright 2022 SUSE LLC SPDX-License-Identifier: FSFAP
QE SAP <qe-sap@suse.de>
Package with common methods and default or constant values for Trento tests
Clone gitlab.suse.de/qa-css/trento
Get the set of scripts for the Trento deployment
Return a string to be used as cloud resource group. It contains the JobId
Create a variable map and prepare the qe-sap-deployment using it
Deploy the main VM for the Trento application Based on 00.040-trento_vm_server_deploy_azure.sh
Create ACR in Azure and upload from IBS needed images Based on trento_acr_azure.sh
Install Trento on the VM. Based on 01.010-trento_server_installation_premium_v.sh
Deploy a SAP Landscape using a previously configured qe-sap-deployment
Destroy the qe-sap-deployment SAP Landscape
Return a string to be used as cloud VM name. It contains the JobId
Return a string to be used as cloud ACR name. It contains the JobId
Return the running VM public IP
Return the private IP of the Trento instance, needed by the agent configuration
Return the password for the Trento WebUI
Delete the resource group associated to this JobID and all its content
Compose ssh command for remote execution on the VM machine. The function optionally accept the VM public IP. If not provided, the IP is calculated on the fly with an az query, take care that is a time consuming az query.
Install trento-agent on all the nodes. Installation is performed using ansible.
Get all relevant info out from the cluster
Test Trento VM and k8s cluster running on it
Call trento-support.sh and dump_scenario_from_k8.sh and upload the logs
Call dump_scenario_from_k8.sh and upload the logs
Get the api-key from the Trento installation
Run `crm status` and `SAPHanaSR-showAttr --format=script` on the specified host. Command is executed remotely with Ansible and nothing more (no output collected for further processing)
Remotly run on $host as user hdbadm
This function allow to wait for a specific output for 'SAPHanaSR-showAttr', on one specific remote host. Remotely runs 'SAPHanaSR-showAttr' on $host. Runs 'SAPHanaSR-showAttr' multiple times in a loop, retying until the output PASS the test 'f_status'. The 'f_status' test is passed as a "function pointer".
Usage example: cluster_wait_status($primary_host, sub { ((shift =~ m/.+UNDEFINED.+SFAIL/) && (shift =~ m/.+PROMOTED.+PRIM/)); });
This one result in SAPHanaSR-showAttr to be called on the HANA PRIMARY until : the line about vmhana01 match with regexp .+UNDEFINED.+SFAIL AND the line about vmhana02 match with regexp .+PROMOTED.+PRIM
Remotely run 'SAPHanaSR-showAttr' in a loop on $host, wait output that matches regular expression
Run 00.050 net peering script
Perform some generic checks related to the podman installation itself and the relevant parameters of the current machine environment.
Delete all podman containers with name containing CYPRESS_IMAGE_TAG
Check for status of running container with given name. Polling state until container Status become Exit or timeout. Gently terminate podman in case of timeout. Return the container Exit status.
Run a command within the running container
Prepare all the configuration files for cypress
Prepare whatever is needed to run cypress tests using container
Upload to openQA the relevant logs
Execute a cypress command within the container
Execute a set of cypress tests. Execute, one by one, all tests in all .js files in the provided folder.