Skip to content

Commit cf453a5

Browse files
author
Chenglong Liu
committed
Fix Remove test issue
1 parent f2c758f commit cf453a5

File tree

4 files changed

+3
-33
lines changed

4 files changed

+3
-33
lines changed

src/Cdn/Cdn.Autorest/custom/Remove-AzFrontDoorCdnProfile.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,10 @@ function Remove-AzFrontDoorCdnProfile {
155155
)
156156

157157
process {
158-
159158
if ($PSCmdlet.ParameterSetName -eq 'Delete') {
160159
$frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -ResourceGroupName ${ResourceGroupName} -Name ${Name}
161160
} elseif ($PSCmdlet.ParameterSetName -eq 'DeleteViaIdentity') {
162-
$frontDoorCdnProfile = $InputObject
161+
$frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -InputObject $InputObject
163162
}else {
164163
throw "Not supported ParameterSetName."
165164
}
@@ -168,7 +167,6 @@ function Remove-AzFrontDoorCdnProfile {
168167
{
169168
throw "Provided FrontDoorCdnProfile does not exist."
170169
}else{
171-
Write-Host -ForegroundColor Green "Skuname $($frontDoorCdnProfile.SkuName)"
172170
if(ISFrontDoorCdnProfile($frontDoorCdnProfile.SkuName)){
173171
Az.Cdn.internal\Remove-AzCdnProfile @PSBoundParameters
174172
}else{

src/Cdn/Cdn.Autorest/test/Get-AzKubernetesConfiguration.Tests.ps1

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

src/Cdn/Cdn.Autorest/test/Remove-AzFrontDoorCdnProfile.Tests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Describe 'Remove-AzFrontDoorCdnProfile' {
3838

3939
It 'DeleteViaIdentity' {
4040
{
41+
$PSDefaultParameterValues['Disabled'] = $true
4142
$ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6)
4243
try
4344
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"location": "westus",
32
"SubscriptionId": "d7cfdb98-c118-458d-8bdf-246be66b1f5e",
3+
"location": "westus",
44
"Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47"
55
}

0 commit comments

Comments
 (0)