@@ -13,33 +13,31 @@ Basic use: run `task controller:test-integration-envtest`.
1313| AZURE_SUBSCRIPTION_ID | The Azure Subscription ID | Yes | Yes (when recording) |
1414| AZURE_TENANT_ID | The Azure Tenant ID | Yes | Yes (when recording) |
1515| TEST_BILLING_ID | The Azure billing ID | No | Yes (when recording SubscriptionAlias tests) |
16- | CODECOV_TOKEN | The token to https://app.codecov.io/gh/Azure/azure-service-operator | Yes | No |
17- | GH_PAT | GitHub PAT, used for PR automation | Yes | No |
16+ | CODECOV_TOKEN | The token to < https://app.codecov.io/gh/Azure/azure-service-operator > | Yes | No |
1817| REGISTRY_LOGIN | The Azure Container Registry to log in to (for az acr login --name {name}) | Yes | No |
1918| REGISTRY_PRERELEASE | The path to the container prerelease registry (right now this isn't used) | No | No |
2019| REGISTRY_PUBLIC | The path to the container release registry, used in --tag "{REGISTRY_PUBLIC}/{CONTROLLER_DOCKER_IMAGE}" | No | No |
2120
22-
2321### Record/replay
2422
25- The task ` controller:test-integration-envtest ` runs the tests in a record/replay mode by default, so that it does not
26- touch any live Azure resources. (This uses the [ go-vcr] ( https://github.com/dnaeon/go-vcr ) library.) If you change the controller or other code in
23+ The task ` controller:test-integration-envtest ` runs the tests in a record/replay mode by default, so that it does not
24+ touch any live Azure resources. (This uses the [ go-vcr] ( https://github.com/dnaeon/go-vcr ) library.) If you change the controller or other code in
2725such a way that the required requests/responses from ARM change, you will need to update the recordings.
2826
29- To do this, delete the recordings for the failing tests (under ` {test-dir}/recordings/{test-name}.yaml ` ), and re-run
30- ` controller:test-integration-envtest ` . If the test passes, a new recording will be saved, which you can commit to
27+ To do this, delete the recordings for the failing tests (under ` {test-dir}/recordings/{test-name}.yaml ` ), and re-run
28+ ` controller:test-integration-envtest ` . If the test passes, a new recording will be saved, which you can commit to
3129include with your change. All authentication and subscription information is removed from the recording.
3230
33- To run the test and produce a new recording you will need to have set the required authentication environment variables
34- ` AZURE_SUBSCRIPTION_ID ` and ` AZURE_TENANT_ID ` , _ and_ logged in via ` az login ` (or you just use the ` task ` commands
35- mentioned below and it will prompt you to ` az login ` if needed for that specific command).
31+ To run the test and produce a new recording you will need to have set the required authentication environment variables
32+ ` AZURE_SUBSCRIPTION_ID ` and ` AZURE_TENANT_ID ` , _ and_ logged in via ` az login ` (or you just use the ` task ` commands
33+ mentioned below and it will prompt you to ` az login ` if needed for that specific command).
3634Note that you must be ` Owner ` on the subscription to execute some tests in record mode.
3735
38- A few tests also need the ` TEST_BILLING_ID ` environment variable set to a valid Azure Billing ID when running in record mode.
39- In replay mode this variable is never required. Note that the billing ID is redacted from all recording files so that
36+ A few tests also need the ` TEST_BILLING_ID ` environment variable set to a valid Azure Billing ID when running in record mode.
37+ In replay mode this variable is never required. Note that the billing ID is redacted from all recording files so that
4038the resulting file can be replayed by anybody, even somebody who does not know the Billing ID the test was recorded with.
4139
42- Some Azure resources take longer to provision or delete than the default test timeout of 15m. To change the timeout,
40+ Some Azure resources take longer to provision or delete than the default test timeout of 15m. To change the timeout,
4341set ` TIMEOUT ` to a suitable value when running task. For example, to give your test a 60m timeout, use:
4442
4543``` bash
@@ -48,12 +46,13 @@ TIMEOUT=60m task controller:test-integration-envtest
4846
4947### Running live tests
5048
51- If you want to skip all recordings and run all tests directly against live Azure resources, you can use the
52- ` controller:test-integration-envtest-live ` task. This will also require you to set the authentication environment
49+ If you want to skip all recordings and run all tests directly against live Azure resources, you can use the
50+ ` controller:test-integration-envtest-live ` task. This will also require you to set the authentication environment
5351variables and ` az login ` , as detailed above.
5452
5553### Running a single test
56- By default ` task controller:test-integration-envtest ` and its variants run all tests. This is often undesirable
54+
55+ By default ` task controller:test-integration-envtest ` and its variants run all tests. This is often undesirable
5756as you may just be working on a single feature or test. In order to run a subset of tests, use the ` TEST_FILTER ` :
5857
5958``` bash
0 commit comments