Skip to content

Commit 76b7c10

Browse files
authored
Updating help content and help tests (AutomatedLab#1394)
* Updating help, testing help * Support for Online parameter * Adding Help URIs at proper location * ParameterSet recognition Help tests * Exit on failed test * Updating tests
1 parent 35f5189 commit 76b7c10

File tree

361 files changed

+1802
-1193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

361 files changed

+1802
-1193
lines changed

.build/psake.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ Task Test -Depends Init {
213213
# Need to tell psake or it will proceed to the deployment. Danger!
214214
if ($TestResults.FailedCount -gt 0)
215215
{
216-
throw "Failed '$($TestResults.FailedCount)' tests, build failed"
216+
Write-Error "Failed '$($TestResults.FailedCount)' tests, build failed"
217+
exit 666
217218
}
218219
}
219220
"`n"

AutomatedLab/AutomatedLabConfigurationManager.psm1

+4
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ function Install-LabConfigurationManager
317317
$siteParameter.SqlServerName = $sql
318318
}
319319

320+
Invoke-LabCommand -ComputerName $sql.Split('.')[0] -ActivityName 'Add computer account as local admin (why...)' -ScriptBlock {
321+
Add-LocalGroupMember -Group Administrators -Member "$($vm.Name)\$($vm.DomainName)`$"
322+
} -Variable (Get-Variable vm)
323+
320324
if ($role.Properties.ContainsKey('DatabaseName'))
321325
{
322326
$siteParameter.DatabaseName = $role.Properties.DatabaseName

AutomatedLabDefinition/AutomatedLabDefinition.psm1

+1
Original file line numberDiff line numberDiff line change
@@ -1774,6 +1774,7 @@ function Add-LabDiskDefinition
17741774
[long]$AllocationUnitSize = 4KB,
17751775

17761776
[ValidateSet('MBR','GPT')]
1777+
[string]
17771778
$PartitionStyle = 'GPT',
17781779

17791780
[switch]$SkipInitialize,

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Enhancements
66

77
- New configuration item UseLatestAzureProviderApi to use latest available provider instead of hardcoded values
8+
- Including tests for existing help content to ensure quality of help content
89

910
### Bugs
1011

Help/AutomatedLab.Recipe/en-us/Export-LabSnippet.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Export-LabSnippet
55
schema: 2.0.0
66
---
77

@@ -88,3 +88,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
8888
## NOTES
8989
9090
## RELATED LINKS
91+

Help/AutomatedLab.Recipe/en-us/Get-LabRecipe.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Get-LabRecipe
55
schema: 2.0.0
66
---
77

@@ -84,3 +84,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
8484
## NOTES
8585
8686
## RELATED LINKS
87+

Help/AutomatedLab.Recipe/en-us/Get-LabSnippet.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Get-LabSnippet
55
schema: 2.0.0
66
---
77

@@ -129,3 +129,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
129129
## NOTES
130130
131131
## RELATED LINKS
132+

Help/AutomatedLab.Recipe/en-us/Invoke-LabRecipe.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Invoke-LabRecipe
55
schema: 2.0.0
66
---
77

@@ -43,21 +43,6 @@ Instead of invoking the recipe, stores it as D:\SuperEasy.ps1
4343

4444
## PARAMETERS
4545

46-
### -Confirm
47-
Prompts you for confirmation before running the cmdlet.
48-
49-
```yaml
50-
Type: SwitchParameter
51-
Parameter Sets: (All)
52-
Aliases: cf
53-
54-
Required: False
55-
Position: Named
56-
Default value: False
57-
Accept pipeline input: False
58-
Accept wildcard characters: False
59-
```
60-
6146
### -DefaultAddressSpace
6247
Override the default address space of the recipe
6348

@@ -209,6 +194,21 @@ Accept pipeline input: True (ByValue)
209194
Accept wildcard characters: False
210195
```
211196
197+
### -Confirm
198+
Prompts you for confirmation before running the cmdlet.
199+
200+
```yaml
201+
Type: SwitchParameter
202+
Parameter Sets: (All)
203+
Aliases: cf
204+
205+
Required: False
206+
Position: Named
207+
Default value: False
208+
Accept pipeline input: False
209+
Accept wildcard characters: False
210+
```
211+
212212
### -WhatIf
213213
Shows what would happen if the cmdlet runs.
214214
The cmdlet is not run.
@@ -238,3 +238,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
238238
## NOTES
239239
240240
## RELATED LINKS
241+

Help/AutomatedLab.Recipe/en-us/Invoke-LabSnippet.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Invoke-LabSnippet
55
schema: 2.0.0
66
---
77

@@ -76,3 +76,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
7676
## NOTES
7777
7878
## RELATED LINKS
79+

Help/AutomatedLab.Recipe/en-us/New-LabRecipe.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/New-LabRecipe
55
schema: 2.0.0
66
---
77

@@ -32,21 +32,6 @@ This recipe deploys a minuscule environment for automated tests
3232

3333
## PARAMETERS
3434

35-
### -Confirm
36-
Prompts you for confirmation before running the cmdlet.
37-
38-
```yaml
39-
Type: SwitchParameter
40-
Parameter Sets: (All)
41-
Aliases: cf
42-
43-
Required: False
44-
Position: Named
45-
Default value: False
46-
Accept pipeline input: False
47-
Accept wildcard characters: False
48-
```
49-
5035
### -DefaultAddressSpace
5136
Default address space for a new lab
5237

@@ -199,6 +184,21 @@ Accept pipeline input: False
199184
Accept wildcard characters: False
200185
```
201186
187+
### -Confirm
188+
Prompts you for confirmation before running the cmdlet.
189+
190+
```yaml
191+
Type: SwitchParameter
192+
Parameter Sets: (All)
193+
Aliases: cf
194+
195+
Required: False
196+
Position: Named
197+
Default value: False
198+
Accept pipeline input: False
199+
Accept wildcard characters: False
200+
```
201+
202202
### -WhatIf
203203
Shows what would happen if the cmdlet runs.
204204
The cmdlet is not run.
@@ -227,3 +227,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
227227
## NOTES
228228
229229
## RELATED LINKS
230+

Help/AutomatedLab.Recipe/en-us/New-LabSnippet.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/New-LabSnippet
55
schema: 2.0.0
66
---
77

@@ -170,3 +170,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
170170
## NOTES
171171
172172
## RELATED LINKS
173+

Help/AutomatedLab.Recipe/en-us/Remove-LabRecipe.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Remove-LabRecipe
55
schema: 2.0.0
66
---
77

@@ -37,21 +37,6 @@ Removes the recipe MyBuildEnvironment
3737

3838
## PARAMETERS
3939

40-
### -Confirm
41-
Prompts you for confirmation before running the cmdlet.
42-
43-
```yaml
44-
Type: SwitchParameter
45-
Parameter Sets: (All)
46-
Aliases: cf
47-
48-
Required: False
49-
Position: Named
50-
Default value: False
51-
Accept pipeline input: False
52-
Accept wildcard characters: False
53-
```
54-
5540
### -Name
5641
Name of the recipe
5742

@@ -82,6 +67,21 @@ Accept pipeline input: True (ByValue)
8267
Accept wildcard characters: False
8368
```
8469
70+
### -Confirm
71+
Prompts you for confirmation before running the cmdlet.
72+
73+
```yaml
74+
Type: SwitchParameter
75+
Parameter Sets: (All)
76+
Aliases: cf
77+
78+
Required: False
79+
Position: Named
80+
Default value: False
81+
Accept pipeline input: False
82+
Accept wildcard characters: False
83+
```
84+
8585
### -WhatIf
8686
Shows what would happen if the cmdlet runs.
8787
The cmdlet is not run.
@@ -111,3 +111,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
111111
## NOTES
112112
113113
## RELATED LINKS
114+

Help/AutomatedLab.Recipe/en-us/Remove-LabSnippet.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Remove-LabSnippet
55
schema: 2.0.0
66
---
77

@@ -58,3 +58,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
5858
## NOTES
5959
6060
## RELATED LINKS
61+

Help/AutomatedLab.Recipe/en-us/Save-LabRecipe.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Save-LabRecipe
55
schema: 2.0.0
66
---
77

@@ -32,21 +32,6 @@ Saves the recipe SuperEasy
3232

3333
## PARAMETERS
3434

35-
### -Confirm
36-
Prompts you for confirmation before running the cmdlet.
37-
38-
```yaml
39-
Type: SwitchParameter
40-
Parameter Sets: (All)
41-
Aliases: cf
42-
43-
Required: False
44-
Position: Named
45-
Default value: False
46-
Accept pipeline input: False
47-
Accept wildcard characters: False
48-
```
49-
5035
### -Recipe
5136
The recipe to store
5237

@@ -62,6 +47,21 @@ Accept pipeline input: True (ByValue)
6247
Accept wildcard characters: False
6348
```
6449
50+
### -Confirm
51+
Prompts you for confirmation before running the cmdlet.
52+
53+
```yaml
54+
Type: SwitchParameter
55+
Parameter Sets: (All)
56+
Aliases: cf
57+
58+
Required: False
59+
Position: Named
60+
Default value: False
61+
Accept pipeline input: False
62+
Accept wildcard characters: False
63+
```
64+
6565
### -WhatIf
6666
Shows what would happen if the cmdlet runs.
6767
The cmdlet is not run.
@@ -90,3 +90,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
9090
## NOTES
9191
9292
## RELATED LINKS
93+

Help/AutomatedLab.Recipe/en-us/Set-LabSnippet.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Set-LabSnippet
55
schema: 2.0.0
66
---
77

@@ -136,3 +136,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
136136
## NOTES
137137
138138
## RELATED LINKS
139+

Help/AutomatedLab.Recipe/en-us/Update-LabSnippet.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: AutomatedLab.Recipe-help.xml
33
Module Name: AutomatedLab.Recipe
4-
online version:
4+
online version: https://automatedlab.org/en/latest/AutomatedLab.Recipe/en-us/Update-LabSnippet
55
schema: 2.0.0
66
---
77

@@ -43,3 +43,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
4343
## NOTES
4444

4545
## RELATED LINKS
46+

0 commit comments

Comments
 (0)