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](https://www.python.org/) using the [Microsoft Azure SDK for Python](https://pypi.org/project/azure-mgmt-resource/) and the [pytest](https://docs.pytest.org/en/latest/) framework. See [requirements.txt](requirements.txt) for other dependencies.
### Environment Variables
These tests assume the following environment variables exist when running the tests. See [Azure Key Vault](https://azure.microsoft.com/en-us/services/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](https://github.com/Azure/Avere).
## How To Run Tests
Tests can be invoked by the usual [pytest](https://docs.pytest.org/en/latest/) 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:
When running the tests, the standard [pytest command-line arguments](https://docs.pytest.org/en/latest/reference/reference.html#ini-options-refhttps://docs.pytest.org/en/latest/reference.html#ini-options-ref) are available. In addition, the following custom command-line options are available:
| RUN_BYOVNET | false | When "true", run the "bring your own VNET" variant (test_byovnet_deploy in [test_vfxt_template_deploy.py](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](test_vfxt_template_deploy.py).
| RUN_EDASIM_STEP | true | When "true", run the EDASIM tests [test_edasim.py](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](test_vfxt_template_deploy.py).
| RUN_VDBENCH_STEP | false | When "true", run the vdbench tests [test_vdbench.py](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.