Avere/test
Omar Zevallos 55d9227557
Add some regions to the restricted list (region_deploy_utils.py) (#1235)
2021-07-01 17:35:10 -04:00
..
internal Add some regions to the restricted list (region_deploy_utils.py) (#1235) 2021-07-01 17:35:10 -04:00
lib Update Automation (#1026) 2021-01-12 12:52:30 -05:00
utils Internal Testing: enhance cleanup logic (#982) 2020-12-03 17:18:44 -05:00
README.md fixing broken links (#1179) 2021-04-29 16:22:21 +01:00
arm_template_deploy.py Updated copyright notice for source files under /test 2019-02-21 11:52:29 -05:00
bootstrap.reg_client.sh add docs for e2e rendering (#430) 2019-07-15 18:03:42 -04:00
check_node_basic_fileops.sh Updated copyright notice for source files under /test 2019-02-21 11:52:29 -05:00
conftest.py Added resiliency for averecmd to collect logs, etc 2019-04-16 15:57:09 -04:00
requirements.txt Version lock requirements file (#641) 2020-04-25 00:17:11 -04:00
test_edasim.py update all master branch refs to main (#822) 2020-08-21 11:48:40 +01:00
test_reg_client_setup.py Use only the existing VMAS client template instead of using a new one 2019-05-06 17:18:04 -04:00
test_vdbench.py update all master branch refs to main (#822) 2020-08-21 11:48:40 +01:00
test_vfxt_client_docker.py Update test_vfxt_client_docker.py 2019-04-16 11:37:07 -04:00
test_vfxt_cluster_status.py Update Automation (#1026) 2021-01-12 12:52:30 -05:00
test_vfxt_template_deploy.py Test updates (#445) 2019-09-13 22:07:13 -04:00

README.md

Build Status

Avere vFXT ARM Template Testing

This directory contains automated tests using ARM-based templates to deploy Avere vFXT clusters and associated resources, including clients for various test scenarios. The primary scope of these tests is to validate the effectiveness and usability of the ARM templates. Additionally, some vFXT feature and performance tests are included.

Requirements

Tests are written in Python 3 using the Microsoft Azure SDK for Python and the pytest framework. See requirements.txt for other dependencies.

Environment Variables

These tests assume the following environment variables exist when running the tests. See Azure Key Vault for information on storing your secrets securely.

Environment Variable Description
AVERE_ADMIN_PW The password for the Avere vFXT cluster.
AVERE_CONTROLLER_PW The password for the Avere vFXT controller.
AZURE_CLIENT_ID The Azure client ID.
AZURE_CLIENT_SECRET The Azure client password (secret).
AZURE_SUBSCRIPTION_ID The Azure subscription under which to deploy resources.
AZURE_TENTANT_ID The Azure tentant ID.
BUILD_SOURCESDIRECTORY The local root directory for a clone of the Azure/Avere repo.

How To Run Tests

Tests can be invoked by the usual pytest methods. The simplest way to run all of the tests is to simply run "pytest" from the $BUILD_SOURCESDIRECTORY directory. However, that method should not be used because multiple deployments will then be initiated back-to-back, and failures due to name conflicts and or quota usage are likely to occur.

The recommended method for running these tests is to first call a specific deploy test. Example:

pytest test/test_vfxt_template_deploy.py::TestVfxtTemplateDeploy::test_deploy_template

That will run the test_deploy_template test in the test_vfxt_template_deploy.py file.

After the cluster has been deployed, any of the other test_*.py files can be run.

(placeholder -- link to plan, DevOps or otherwise)

Custom Command-Line Arguments

When running the tests, the standard pytest command-line arguments are available. In addition, the following custom command-line options are available:

$ pytest --help

...

custom options:
  --build_root=BUILD_ROOT
                        Local path to the root of the Azure/Avere repo clone
                        (e.g., /home/user1/git/Azure/Avere). This is used to
                        find the various templates that are deployed during
                        these tests. (default: $BUILD_SOURCESDIRECTORY if set,
                        else current directory)
  --location=LOCATION   Azure region short name to use for deployments
                        (default: westus2)
  --prefer_cli_args     When specified, prioritize custom command-line
                        arguments over the values in the file pointed to by
                        "test_vars_file".
  --ssh_priv_key=SSH_PRIV_KEY
                        SSH private key to use in deployments and tests
                        (default: ~/.ssh/id_rsa)
  --ssh_pub_key=SSH_PUB_KEY
                        SSH public key to use in deployments and tests
                        (default: ~/.ssh/id_rsa.pub)
  --test_vars_file=TEST_VARS_FILE
                        Test variables file used for passing values between
                        runs. This file is in JSON format. It is loaded during
                        test setup and written out during test teardown. The
                        contents of this file override other custom command-
                        line options unless the "prefer_cli_args" option is
                        specified. (default: $VFXT_TEST_VARS_FILE if set, else
                        None)

...

Arguments are defined in conftest.py.

Internal Use

The following sections are for internal Microsoft use only.

Pipelines Variables

The following Pipelines variables are available in DevOps and control how queued Pipelines run.

Variable Default Description
RUN_BYOVNET false When "true", run the "bring your own VNET" variant (test_byovnet_deploy in test_vfxt_template_deploy.py.
RUN_DEPLOY true When "true", run the "create a new VNET" variant (test_template_deploy in test_vfxt_template_deploy.py.
RUN_EDASIM_STEP true When "true", run the EDASIM tests test_edasim.py.
RUN_EMPTY_STORAGE false When "true", run the "no blob storage, no storage account needed" variant (test_no_storage_account_deploy in test_vfxt_template_deploy.py.
RUN_VDBENCH_STEP false When "true", run the vdbench tests test_vdbench.py.
SKIP_RG_CLEANUP false When "true", do not clean up the resource group at the end of the Pipelines run.
VFXT_DEPLOY_LOCATION westus2 The Azure region short name to which to deploy resources.