lib/trento.pm

NAME

Trento test lib

COPYRIGHT

Copyright 2022 SUSE LLC SPDX-License-Identifier: FSFAP

AUTHORS

QE SAP <qe-sap@suse.de>

DESCRIPTION

Package with common methods and default or constant values for Trento tests

Methods

Clone gitlab.suse.de/qa-css/trento

WORK_DIR - folder where to clone the repo

get_trento_deployment

Get the set of scripts for the Trento deployment

WORK_DIR - folder where to clone the repo

get_resource_group

Return a string to be used as cloud resource group. It contains the JobId

get_qesap_resource_group

Query and return the resource group used by the qe-sap-deployment

cluster_config

Create a variable map and prepare the qe-sap-deployment using it =over 3

PROVIDER - CloudProvider name
REGION - region for the deployment
SCC - SCC_REGCODE

deploy_vm

Deploy the main VM for the Trento application Based on 00.040-trento_vm_server_deploy_azure.sh

WORK_DIR - folder where to clone the repo

trento_acr_azure

Create ACR in Azure and upload from IBS needed images Based on trento_acr_azure.sh

WORK_DIR - folder where to clone the repo

install_trento

Install Trento on the VM. Based on 01.010-trento_server_installation_premium_v.sh

cluster_deploy

Deploy a SAP Landscape using a previously configured qe-sap-deployment

cluster_destroy

Destroy the qe-sap-deployment SAP Landscape

get_vm_name

Return a string to be used as cloud VM name. It contains the JobId

get_acr_name

Return a string to be used as cloud ACR name. It contains the JobId

get_trento_ip

Return the running VM public IP

get_trento_private_ip

Return the private IP of the Trento instance, needed by the agent configuration

get_vnet

Return the output of az network vnet list =over 1

RESOURCE_GROUP - resource group name to query

get_trento_password

Return the password for the Trento WebUI

az_delete_group

Delete the resource group associated to this JobID and all its content

az_vm_ssh_cmd

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.

CMD_ARG - String of the command to be executed remotely
VM_IP_ARG - Public IP of the remote machine where to execute the command

cluster_install_agent

Install trento-agent on all the nodes. Installation is performed using ansible.

WORK_DIRECTORY - Working directory, used to eventually download .rpm
PLAYBOOK_LOCATION - Path where to find trento-agent.yaml file
API_KEY - Api key needed to configure trento-agent

k8s_logs

Get all relevant info out from the cluster

CMD_ARG - String of the command to be executed remotely
VM_IP_ARG - Public IP of the remote machine where to execute the command

k8s_test

Test Trento VM and k8s cluster running on it

trento_support

Call trento-support.sh and dump_scenario_from_k8.sh and upload the logs

trento_collect_scenarios

Call dump_scenario_from_k8.sh and upload the logs

trento_api_key

Get the api-key from the Trento installation

cluster_print_cluster_status

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)

cluster_hdbadm

Remotly run on $host as user hdbadm

cluster_wait_status

Remotly run 'SAPHanaSR-showAttr' in a loop on $host, wait output that match in f_status callback test

cluster_trento_net_peering

Run 00.050 net peering script

podman_self_check

Perform some generic checks related to the podman installation itself and the relevant parameters of the current machine environment.

cypress_configs

Prepare all the configuration files for cypress

CYPRESS_TEST_DIR - Cypress test code location.

cypress_install_container

Prepare whatever is needed to run cypress tests using container

CYPRESS_VER - String used as tag for the cypress/included image.

cypress_log_upload

Upload to openQA the relevant logs

LOG_FILTER - List of strings. List of file extensions (dot needed)

cypress_version

Return the cypress.io version to use. It could be the default one or one fixed by the user using TRENTO_CYPRESS_VERSION

cypress_exec

Execute a cypress command within the container

CYPRESS_TEST_DIR - String of the path where the cypress Trento code is available. It is the test folder within the path used by setup_jumphost
CMD - String of cmd to be used as main argument for the cypress executable call.
TIMEOUT - Integer used as timeout for the cypress command execution
LOG_PREFIX - String of the command to be executed remotely
FAILOK - Integer boolean value. 0:test marked as failure if the podman/cypress return not 0 exit code. 1:all not 0 podman/cypress exit code are ignored. SoftFail reported.

cypress_test_exec

Execute a set of cypress tests. Execute, one by one, all tests in all .js files in the provided folder.

CYPRESS_TEST_DIR - String of the path where the cypress Trento code is available. It is the test folder within the path used by setup_jumphost
TEST_TAG - String of the test subfolder within $cypress_test_dir/cypress/integration Also used as tag for each test result file
TIMEOUT - Integer used as timeout for the internal cypress_exec call

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 100:

Unknown directive: =hean3

Around line 247:

'=item' outside of any '=over'

Around line 515:

'=item' outside of any '=over'