Skip to content

Commit 89bd267

Browse files
committed
Add tests
Update Get-AzCdnSubscriptionResourceUsage.Tests.ps1 Update Test-AzCdnProbe.Tests.ps1 2
1 parent 3cd0269 commit 89bd267

10 files changed

+69
-196
lines changed

src/Cdn/Cdn.Autorest/Az.Cdn.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Cdn.private.dll'
1313
FormatsToProcess = './Az.Cdn.format.ps1xml'
14-
FunctionsToExport = 'Clear-AzCdnEndpointContent', 'Clear-AzFrontDoorCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnManagedRuleSet', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnPolicy', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnResourceUsage', 'Get-AzFrontDoorCdnCustomDomain', 'Get-AzFrontDoorCdnEndpoint', 'Get-AzFrontDoorCdnEndpointResourceUsage', 'Get-AzFrontDoorCdnOrigin', 'Get-AzFrontDoorCdnOriginGroup', 'Get-AzFrontDoorCdnOriginGroupResourceUsage', 'Get-AzFrontDoorCdnProfile', 'Get-AzFrontDoorCdnProfileResourceUsage', 'Get-AzFrontDoorCdnRoute', 'Get-AzFrontDoorCdnRule', 'Get-AzFrontDoorCdnRuleSet', 'Get-AzFrontDoorCdnRuleSetResourceUsage', 'Get-AzFrontDoorCdnSecret', 'Get-AzFrontDoorCdnSecurityPolicy', 'Import-AzCdnEndpointContent', 'Invoke-AzCdnSecretValidate', 'New-AzCdnAFDDomainHttpsParametersObject', 'New-AzCdnAzureFirstPartyManagedCertificateParametersObject', 'New-AzCdnCustomDomain', 'New-AzCdnCustomDomainHttpsParametersObject', 'New-AzCdnCustomerCertificateParametersObject', 'New-AzCdnDeliveryRuleCacheExpirationActionObject', 'New-AzCdnDeliveryRuleCacheKeyQueryStringActionObject', 'New-AzCdnDeliveryRuleClientPortConditionObject', 'New-AzCdnDeliveryRuleCookiesConditionObject', 'New-AzCdnDeliveryRuleHostNameConditionObject', 'New-AzCdnDeliveryRuleHttpVersionConditionObject', 'New-AzCdnDeliveryRuleIsDeviceConditionObject', 'New-AzCdnDeliveryRulePostArgsConditionObject', 'New-AzCdnDeliveryRuleQueryStringConditionObject', 'New-AzCdnDeliveryRuleRemoteAddressConditionObject', 'New-AzCdnDeliveryRuleRequestBodyConditionObject', 'New-AzCdnDeliveryRuleRequestHeaderActionObject', 'New-AzCdnDeliveryRuleRequestHeaderConditionObject', 'New-AzCdnDeliveryRuleRequestMethodConditionObject', 'New-AzCdnDeliveryRuleRequestSchemeConditionObject', 'New-AzCdnDeliveryRuleRequestUriConditionObject', 'New-AzCdnDeliveryRuleResponseHeaderActionObject', 'New-AzCdnDeliveryRuleRouteConfigurationOverrideActionObject', 'New-AzCdnDeliveryRuleServerPortConditionObject', 'New-AzCdnDeliveryRuleSocketAddrConditionObject', 'New-AzCdnDeliveryRuleSslProtocolConditionObject', 'New-AzCdnDeliveryRuleUrlFileExtensionConditionObject', 'New-AzCdnDeliveryRuleUrlFileNameConditionObject', 'New-AzCdnDeliveryRuleUrlPathConditionObject', 'New-AzCdnEndpoint', 'New-AzCdnManagedCertificateParametersObject', 'New-AzCdnManagedHttpsParametersObject', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnOriginGroupOverrideActionObject', 'New-AzCdnPolicy', 'New-AzCdnProfile', 'New-AzCdnProfileSsoUri', 'New-AzCdnSecurityPolicyWebApplicationFirewallAssociationObject', 'New-AzCdnSecurityPolicyWebApplicationFirewallParametersObject', 'New-AzCdnUrlRedirectActionObject', 'New-AzCdnUrlRewriteActionObject', 'New-AzCdnUrlSigningActionObject', 'New-AzCdnUrlSigningKeyParametersObject', 'New-AzCdnUserManagedHttpsParametersObject', 'New-AzFrontDoorCdnCustomDomain', 'New-AzFrontDoorCdnEndpoint', 'New-AzFrontDoorCdnOrigin', 'New-AzFrontDoorCdnOriginGroup', 'New-AzFrontDoorCdnProfile', 'New-AzFrontDoorCdnRoute', 'New-AzFrontDoorCdnRule', 'New-AzFrontDoorCdnRuleSet', 'New-AzFrontDoorCdnSecret', 'New-AzFrontDoorCdnSecurityPolicy', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnPolicy', 'Remove-AzCdnProfile', 'Remove-AzFrontDoorCdnCustomDomain', 'Remove-AzFrontDoorCdnEndpoint', 'Remove-AzFrontDoorCdnOrigin', 'Remove-AzFrontDoorCdnOriginGroup', 'Remove-AzFrontDoorCdnProfile', 'Remove-AzFrontDoorCdnRoute', 'Remove-AzFrontDoorCdnRule', 'Remove-AzFrontDoorCdnRuleSet', 'Remove-AzFrontDoorCdnSecret', 'Remove-AzFrontDoorCdnSecurityPolicy', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Test-AzFrontDoorCdnEndpointCustomDomain', 'Test-AzFrontDoorCdnEndpointNameAvailability', 'Test-AzFrontDoorCdnProfileHostNameAvailability', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnPolicy', 'Update-AzCdnProfile', 'Update-AzFrontDoorCdnCustomDomain', 'Update-AzFrontDoorCdnCustomDomainValidationToken', 'Update-AzFrontDoorCdnEndpoint', 'Update-AzFrontDoorCdnOrigin', 'Update-AzFrontDoorCdnOriginGroup', 'Update-AzFrontDoorCdnProfile', 'Update-AzFrontDoorCdnRoute', 'Update-AzFrontDoorCdnRule', 'Update-AzFrontDoorCdnSecurityPolicy', '*'
14+
FunctionsToExport = 'Clear-AzCdnEndpointContent', 'Clear-AzFrontDoorCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnManagedRuleSet', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnPolicy', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnSubscriptionResourceUsage', 'Get-AzFrontDoorCdnCustomDomain', 'Get-AzFrontDoorCdnEndpoint', 'Get-AzFrontDoorCdnEndpointResourceUsage', 'Get-AzFrontDoorCdnOrigin', 'Get-AzFrontDoorCdnOriginGroup', 'Get-AzFrontDoorCdnOriginGroupResourceUsage', 'Get-AzFrontDoorCdnProfile', 'Get-AzFrontDoorCdnProfileResourceUsage', 'Get-AzFrontDoorCdnRoute', 'Get-AzFrontDoorCdnRule', 'Get-AzFrontDoorCdnRuleSet', 'Get-AzFrontDoorCdnRuleSetResourceUsage', 'Get-AzFrontDoorCdnSecret', 'Get-AzFrontDoorCdnSecurityPolicy', 'Import-AzCdnEndpointContent', 'Invoke-AzCdnSecretValidate', 'New-AzCdnAFDDomainHttpsParametersObject', 'New-AzCdnAzureFirstPartyManagedCertificateParametersObject', 'New-AzCdnCustomDomain', 'New-AzCdnCustomerCertificateParametersObject', 'New-AzCdnDeliveryRuleCacheExpirationActionObject', 'New-AzCdnDeliveryRuleCacheKeyQueryStringActionObject', 'New-AzCdnDeliveryRuleClientPortConditionObject', 'New-AzCdnDeliveryRuleCookiesConditionObject', 'New-AzCdnDeliveryRuleHostNameConditionObject', 'New-AzCdnDeliveryRuleHttpVersionConditionObject', 'New-AzCdnDeliveryRuleIsDeviceConditionObject', 'New-AzCdnDeliveryRulePostArgsConditionObject', 'New-AzCdnDeliveryRuleQueryStringConditionObject', 'New-AzCdnDeliveryRuleRemoteAddressConditionObject', 'New-AzCdnDeliveryRuleRequestBodyConditionObject', 'New-AzCdnDeliveryRuleRequestHeaderActionObject', 'New-AzCdnDeliveryRuleRequestHeaderConditionObject', 'New-AzCdnDeliveryRuleRequestMethodConditionObject', 'New-AzCdnDeliveryRuleRequestSchemeConditionObject', 'New-AzCdnDeliveryRuleRequestUriConditionObject', 'New-AzCdnDeliveryRuleResponseHeaderActionObject', 'New-AzCdnDeliveryRuleRouteConfigurationOverrideActionObject', 'New-AzCdnDeliveryRuleServerPortConditionObject', 'New-AzCdnDeliveryRuleSocketAddrConditionObject', 'New-AzCdnDeliveryRuleSslProtocolConditionObject', 'New-AzCdnDeliveryRuleUrlFileExtensionConditionObject', 'New-AzCdnDeliveryRuleUrlFileNameConditionObject', 'New-AzCdnDeliveryRuleUrlPathConditionObject', 'New-AzCdnEndpoint', 'New-AzCdnManagedCertificateParametersObject', 'New-AzCdnManagedHttpsParametersObject', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnOriginGroupOverrideActionObject', 'New-AzCdnPolicy', 'New-AzCdnProfile', 'New-AzCdnProfileSsoUri', 'New-AzCdnSecurityPolicyWebApplicationFirewallAssociationObject', 'New-AzCdnSecurityPolicyWebApplicationFirewallParametersObject', 'New-AzCdnUrlRedirectActionObject', 'New-AzCdnUrlRewriteActionObject', 'New-AzCdnUrlSigningActionObject', 'New-AzCdnUrlSigningKeyParametersObject', 'New-AzCdnUserManagedHttpsParametersObject', 'New-AzFrontDoorCdnCustomDomain', 'New-AzFrontDoorCdnEndpoint', 'New-AzFrontDoorCdnOrigin', 'New-AzFrontDoorCdnOriginGroup', 'New-AzFrontDoorCdnProfile', 'New-AzFrontDoorCdnRoute', 'New-AzFrontDoorCdnRule', 'New-AzFrontDoorCdnRuleSet', 'New-AzFrontDoorCdnSecret', 'New-AzFrontDoorCdnSecurityPolicy', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnPolicy', 'Remove-AzCdnProfile', 'Remove-AzFrontDoorCdnCustomDomain', 'Remove-AzFrontDoorCdnEndpoint', 'Remove-AzFrontDoorCdnOrigin', 'Remove-AzFrontDoorCdnOriginGroup', 'Remove-AzFrontDoorCdnProfile', 'Remove-AzFrontDoorCdnRoute', 'Remove-AzFrontDoorCdnRule', 'Remove-AzFrontDoorCdnRuleSet', 'Remove-AzFrontDoorCdnSecret', 'Remove-AzFrontDoorCdnSecurityPolicy', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Test-AzFrontDoorCdnEndpointCustomDomain', 'Test-AzFrontDoorCdnEndpointNameAvailability', 'Test-AzFrontDoorCdnProfileHostNameAvailability', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnPolicy', 'Update-AzCdnProfile', 'Update-AzFrontDoorCdnCustomDomain', 'Update-AzFrontDoorCdnCustomDomainValidationToken', 'Update-AzFrontDoorCdnEndpoint', 'Update-AzFrontDoorCdnOrigin', 'Update-AzFrontDoorCdnOriginGroup', 'Update-AzFrontDoorCdnProfile', 'Update-AzFrontDoorCdnRoute', 'Update-AzFrontDoorCdnRule', 'Update-AzFrontDoorCdnSecurityPolicy', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/Cdn/Cdn.Autorest/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ directive:
120120
variant: ^CheckViaIdentity$|^CheckViaIdentityExpanded$
121121
subject: ^NameAvailability$|^EndpointNameAvailability$
122122
remove: true
123+
- where:
124+
variant: ^ValidateViaIdentity$|^ValidateViaIdentityExpanded$
125+
subject: ^Probe$
126+
remove: true
123127
- where:
124128
variant: ^EnableExpanded$|^EnableViaIdentityExpanded$
125129
subject: ^CustomDomainCustomHttps$
@@ -171,6 +175,10 @@ directive:
171175
subject: EndpointNameAvailability
172176
set:
173177
subject-prefix: FrontDoorCdn
178+
- where:
179+
subject: ResourceUsage
180+
set:
181+
subject: SubscriptionResourceUsage
174182

175183
# https://github.com/Azure/autorest.powershell/issues/906
176184
- where:

src/Cdn/Cdn.Autorest/docs/Az.Cdn.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Checks the quota and actual usage of endpoints under the given Azure Front Door
5757
Gets the supported optimization types for the current profile.
5858
A user can create an endpoint with an optimization type from the listed values.
5959

60-
### [Get-AzCdnResourceUsage](Get-AzCdnResourceUsage.md)
60+
### [Get-AzCdnSubscriptionResourceUsage](Get-AzCdnSubscriptionResourceUsage.md)
6161
Check the quota and actual usage of the CDN profiles under the given subscription.
6262

6363
### [Get-AzFrontDoorCdnCustomDomain](Get-AzFrontDoorCdnCustomDomain.md)
@@ -118,9 +118,6 @@ Create an in-memory object for AzureFirstPartyManagedCertificateParameters.
118118
### [New-AzCdnCustomDomain](New-AzCdnCustomDomain.md)
119119
Creates a new custom domain within an endpoint.
120120

121-
### [New-AzCdnCustomDomainHttpsParametersObject](New-AzCdnCustomDomainHttpsParametersObject.md)
122-
Create an in-memory object for CustomDomainHttpsParameters.
123-
124121
### [New-AzCdnCustomerCertificateParametersObject](New-AzCdnCustomerCertificateParametersObject.md)
125122
Create an in-memory object for CustomerCertificateParameters.
126123

src/Cdn/Cdn.Autorest/docs/Get-AzCdnResourceUsage.md renamed to src/Cdn/Cdn.Autorest/docs/Get-AzCdnSubscriptionResourceUsage.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
external help file:
33
Module Name: Az.Cdn
4-
online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnresourceusage
4+
online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnsubscriptionresourceusage
55
schema: 2.0.0
66
---
77

8-
# Get-AzCdnResourceUsage
8+
# Get-AzCdnSubscriptionResourceUsage
99

1010
## SYNOPSIS
1111
Check the quota and actual usage of the CDN profiles under the given subscription.
1212

1313
## SYNTAX
1414

1515
```
16-
Get-AzCdnResourceUsage [-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf]
17-
[<CommonParameters>]
16+
Get-AzCdnSubscriptionResourceUsage [-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [-Confirm]
17+
[-WhatIf] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -24,17 +24,21 @@ Check the quota and actual usage of the CDN profiles under the given subscriptio
2424

2525
### Example 1: {{ Add title here }}
2626
```powershell
27-
PS C:\> {{ Add code here }}
27+
{{ Add code here }}
28+
```
2829

30+
```output
2931
{{ Add output here }}
3032
```
3133

3234
{{ Add description here }}
3335

3436
### Example 2: {{ Add title here }}
3537
```powershell
36-
PS C:\> {{ Add code here }}
38+
{{ Add code here }}
39+
```
3740

41+
```output
3842
{{ Add output here }}
3943
```
4044

src/Cdn/Cdn.Autorest/docs/New-AzCdnCustomDomainHttpsParametersObject.md

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

src/Cdn/Cdn.Autorest/docs/Test-AzCdnProbe.md

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ Test-AzCdnProbe -ValidateProbeInput <IValidateProbeInput> [-SubscriptionId <Stri
2626
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
2727
```
2828

29-
### ValidateViaIdentity
30-
```
31-
Test-AzCdnProbe -InputObject <ICdnIdentity> -ValidateProbeInput <IValidateProbeInput>
32-
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
33-
```
34-
35-
### ValidateViaIdentityExpanded
36-
```
37-
Test-AzCdnProbe -InputObject <ICdnIdentity> -ProbeUrl <String> [-DefaultProfile <PSObject>] [-Confirm]
38-
[-WhatIf] [<CommonParameters>]
39-
```
40-
4129
## DESCRIPTION
4230
Check if the probe path is a valid path and the file can be accessed.
4331
Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint.
@@ -80,28 +68,12 @@ Accept pipeline input: False
8068
Accept wildcard characters: False
8169
```
8270
83-
### -InputObject
84-
Identity Parameter
85-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
86-
87-
```yaml
88-
Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity
89-
Parameter Sets: ValidateViaIdentity, ValidateViaIdentityExpanded
90-
Aliases:
91-
92-
Required: True
93-
Position: Named
94-
Default value: None
95-
Accept pipeline input: True (ByValue)
96-
Accept wildcard characters: False
97-
```
98-
9971
### -ProbeUrl
10072
The probe URL to validate.
10173
10274
```yaml
10375
Type: System.String
104-
Parameter Sets: ValidateExpanded, ValidateViaIdentityExpanded
76+
Parameter Sets: ValidateExpanded
10577
Aliases:
10678

10779
Required: True
@@ -116,7 +88,7 @@ Azure Subscription ID.
11688
11789
```yaml
11890
Type: System.String
119-
Parameter Sets: Validate, ValidateExpanded
91+
Parameter Sets: (All)
12092
Aliases:
12193

12294
Required: False
@@ -132,7 +104,7 @@ To construct, see NOTES section for VALIDATEPROBEINPUT properties and create a h
132104
133105
```yaml
134106
Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput
135-
Parameter Sets: Validate, ValidateViaIdentity
107+
Parameter Sets: Validate
136108
Aliases:
137109

138110
Required: True
@@ -180,8 +152,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
180152
181153
### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput
182154
183-
### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity
184-
185155
## OUTPUTS
186156
187157
### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput
@@ -195,22 +165,6 @@ COMPLEX PARAMETER PROPERTIES
195165
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
196166
197167
198-
INPUTOBJECT <ICdnIdentity>: Identity Parameter
199-
- `[CustomDomainName <String>]`: Name of the domain under the profile which is unique globally.
200-
- `[EndpointName <String>]`: Name of the endpoint under the profile which is unique globally.
201-
- `[Id <String>]`: Resource identity path
202-
- `[OriginGroupName <String>]`: Name of the origin group which is unique within the endpoint.
203-
- `[OriginName <String>]`: Name of the origin which is unique within the profile.
204-
- `[PolicyName <String>]`: The name of the CdnWebApplicationFirewallPolicy.
205-
- `[ProfileName <String>]`: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.
206-
- `[ResourceGroupName <String>]`: Name of the Resource group within the Azure subscription.
207-
- `[RouteName <String>]`: Name of the routing rule.
208-
- `[RuleName <String>]`: Name of the delivery rule which is unique within the endpoint.
209-
- `[RuleSetName <String>]`: Name of the rule set under the profile which is unique globally.
210-
- `[SecretName <String>]`: Name of the Secret under the profile.
211-
- `[SecurityPolicyName <String>]`: Name of the security policy under the profile.
212-
- `[SubscriptionId <String>]`: Azure Subscription ID.
213-
214168
VALIDATEPROBEINPUT <IValidateProbeInput>: Input of the validate probe API.
215169
- `ProbeUrl <String>`: The probe URL to validate.
216170

src/Cdn/Cdn.Autorest/examples/Get-AzCdnResourceUsage.md

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnSubscriptionResourceUsage'))
2+
{
3+
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
4+
if (-Not (Test-Path -Path $loadEnvPath)) {
5+
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
6+
}
7+
. ($loadEnvPath)
8+
$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnSubscriptionResourceUsage.Recording.json'
9+
$currentPath = $PSScriptRoot
10+
while(-not $mockingPath) {
11+
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
12+
$currentPath = Split-Path -Path $currentPath -Parent
13+
}
14+
. ($mockingPath | Select-Object -First 1).FullName
15+
}
16+
17+
Describe 'Get-AzCdnSubscriptionResourceUsage' {
18+
It 'List' {
19+
{
20+
$subscriptionResourceUsage = Get-AzCdnSubscriptionResourceUsage
21+
$subscriptionResourceUsage.Count | Should -Be 2
22+
} | Should -Not -Throw
23+
}
24+
}

0 commit comments

Comments
 (0)