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

get_trento_deployment

Get the set of scripts for the Trento deployment

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

config_cluster

deploy_vm

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

deploy_qesap

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

destroy_qesap

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_vnet

Return the output of az network vnet list

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

install_agent

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

WORK_DIRECTORY - Working directory, used to eventually download .rpm
PLAYBOOK - Playbook location
API_KEY - Api key needed to configure trento-agent
PRIVATE_IP - Trento server private IP, used to configure server-url in 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

podman_self_check

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

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_exec

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