Running the Tests#
Note: Acceptance tests create real resources in Azure which often cost money to run.
Acceptance Tests for each Data Source/Resource are located within a Service Package, as such the Acceptance Tests for a given Service Package can be run via:
make acctests SERVICE='<service>' TESTTIMEOUT='60m'
However as many Service Packages contain multiple resources, you can opt to only run a subset by specifying the test prefix/filter to run as shown below:
make acctests SERVICE='<service>' TESTARGS='-run=<nameOfTheTest>' TESTTIMEOUT='60m'
<service>is the name of the folder which contains the file with the test(s) you want to run. The available folders are found inazurerm/internal/services/. So examples aremssql,computeormariadb<nameOfTheTest>should be self-explanatory as it is the name of the test you want to run. An example could beTestAccMsSqlServerExtendedAuditingPolicy_basic. Since-runcan be used with regular expressions you can use it to specify multiple tests like inTestAccMsSqlServerExtendedAuditingPolicy_to run all tests that match that expression
The following Environment Variables must be set in your shell prior to running acceptance tests:
ARM_CLIENT_IDARM_CLIENT_SECRETARM_SUBSCRIPTION_IDARM_TENANT_IDARM_ENVIRONMENTARM_METADATA_HOSTARM_TEST_LOCATIONARM_TEST_LOCATION_ALTARM_TEST_LOCATION_ALT2
Note: Acceptance tests create real resources in Azure which often cost money to run.