You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clu-getstart.md
+35-16Lines changed: 35 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,26 @@ Testing will consist of scenario tests and unit tests. Scenario tests should be
92
92
#### Scenario Tests
93
93
- Scenario tests should be saved under `./examples` directory with one directory per package. Each scenario tests should (eventually) consist of both `.ps1` and `.sh` files and should cover "P0" scenarios.
94
94
95
+
##### Environment Variables for Authentication
96
+
Please set the environment variables for either Username/Password (no 2FA) or ServicePrincipal authentication:
97
+
98
+
**Username/Password (without 2-factor auth):**
99
+
100
+
| Field (case sensitive) | Description |
101
+
| ------------- |:-------------|
102
+
| azureUser | an OrgId user name |
103
+
| password | a service principal name |
104
+
| subscription | (optional) Selects a particular subscription by id. If not provided, the first listed subscription will be selected |
105
+
106
+
**Service Principal:**
107
+
108
+
| Field (case sensitive) | Description |
109
+
| ------------- |:-------------|
110
+
| spn | The tenant guid to authenticate against |
111
+
| secret | the password or application secret to sue for authentication |
112
+
| tenant | The tenant guid to authenticate against |
113
+
| subscription | (optional) Selects a particular subscription by id. If not provided, the first listed subscription will be selected |
114
+
95
115
##### XUnit Automation For Bash Scenario Tests
96
116
- The ```Commands.Common.ScenarioTest``` project contains classes that enable executing bash scenario tests in Visual Studio, or cross-platform using dnx.
97
117
@@ -116,20 +136,18 @@ Testing will consist of scenario tests and unit tests. Scenario tests should be
- Set the environment variable 'TestCredentials' to a connection string providing the credentials to use during test execution. Possible fields include:
120
-
121
-
| Field (casesensitive) | Description |
122
-
| ------------- |:-------------|
123
-
| Username | an OrgId user name |
124
-
| ServicePrincipal | a service principal name |
125
-
| Password | the password or application secret to sue for authentication |
126
-
| TenantId | (required for Service authentication) The tenant guid to authenticate against |
127
-
| SubscriptionId | (optional) Selects a particular subscription by id. If not provided, the first listed subscription will be selected |
128
-
- The infrastructure automatically generates a resource group name and assigns the value to the bash variable ```"$resourceGroupName"```. If your scripts require additional variables, you can add these to your environment before running tests, or you can generate values using the ScriptRunner (for the tests using that runner).
139
+
- Set the [environmentvariables](#environment-variables-for-authentication) for either Username/Password (no 2FA) orServicePrincipalauthentication
- `BASEDIR` - directory path where test script is located
142
+
- `location` - default "WestUS" location
143
+
- `groupName` - randomly generated resource group name (note: the test guarantees that this resource group is deleted at the end of a test run; any other resource groups generated as part of the test run need to be deleted by the test)
144
+
- `storageAccountType` - default "Standard_GRS" storage account type
145
+
- `storageAccountName` - randomly generated storage account name
146
+
- If the script require additional variables, you can add these to your environment before running tests, or you can generate values using the ScriptRunner (for the tests using that runner).
- Tests can be executed in vs, or by runnign ```dnx test project.json```. If you execute dnx test from the project directory, it will work without modification and a log file for each script will be written to the test results directory ```..\TestResults```. If you execute dnx test from a different directory, you must set the following environment variables to provide the path to the examples directory and where to write log files:
150
+
- Tests can be executed in Visual Studio, or by running ```dnx test project.json```. If you execute dnx test from the project directory, it will work without modification and a log file for each script will be written to the test results directory ```..\TestResults```. If you execute dnx test from a different directory, you must set the following environment variables to provide the path to the examples directory and where to write log files:
133
151
134
152
| Environment Variable | Description |
135
153
| ------------- |:-------------|
@@ -138,14 +156,15 @@ Testing will consist of scenario tests and unit tests. Scenario tests should be
138
156
139
157
##### Running Bash Tests using Bash shell
140
158
- Bash tests should be runnable from bash shell in windows/linux/mac environments.
141
-
- To manually run the tests; please set the following envt. variables for authentication and run `./examples/lib/testrunner.sh`
159
+
- To manually run the tests; please set [environment variables](#environment-variables-for-authentication) for authentication as well as update PATH and run `./examples/lib/testrunner.sh`
0 commit comments