Skip to content

Commit 6fcd6d7

Browse files
authored
feat(e2e): Updated readme with setup instructions (Azure#16583)
1 parent 2135643 commit 6fcd6d7

File tree

3 files changed

+17
-58
lines changed

3 files changed

+17
-58
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$bicepFile = Join-Path -Path $PSScriptRoot -ChildPath "../../../test-resources.bicep"
2+
bicep build $bicepFile

sdk/digitaltwins/Azure.DigitalTwins.Core/tests/prerequisites/prerequisite readme.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Prerequisites
22

3-
## Install
4-
53
### Install the latest Powershell 7
64

75
- Make sure you run the script using the latest stable version of [powershell 7](https://github.com/PowerShell/PowerShell/releases)
@@ -13,13 +11,23 @@
1311
- If it isn't, update it
1412
- Use this link to install [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest])
1513

16-
## Delete
14+
### Install Bicep
15+
16+
- Install using the instructions in [bicep](https://github.com/Azure/bicep/blob/main/docs/installing.md)
17+
18+
### Run the setup script
19+
20+
The script outputs [test-resources.bicep](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/digitaltwins/test-resources.bicep) file in the root folder [digitaltwins](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/digitaltwins)
21+
22+
- `.\setup.ps1`
23+
24+
### Generate the ARM template
25+
26+
The ARM template [test-resources.json](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/digitaltwins/test-resources.json) is generated from the [test-resources.bicep](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/digitaltwins/test-resources.bicep) file by running the following script
1727

18-
To delete the digital twins instance, you need to first delete the endpoint added by the script (the service doesn't yet support cascading delete).
28+
- `.\generateArmTemplate.ps1`
1929

20-
1. To do this, run the command `az dt endpoint delete -n <dt name> -g <rg name> --en someEventHubEndpoint`.
21-
1. If you have other endpoints that have been added outside this script, you can discover them with the command `az dt endpoint list -n <dt name> -g <rg name>`.
22-
1. Then delete them with the same command in step 1.
30+
> **Note**: Do not update the ARM template (test-resources.json) manually. Any changes should be made only to the test-resources.bicep file and the ARM template (test-resources.json) should be generated using the above command.
2331
2432
## Maintenance
2533

sdk/digitaltwins/remove-test-resources-pre.ps1

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)