Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,19 @@ public void TestNewSubscription()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Test-NewSubscription");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateRenameSubscription()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Test-UpdateRenameSubscription");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateCancelSubscription()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Test-UpdateCancelSubscription");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Create subscription
function Test-NewSubscription
{
# $accounts = Get-AzEnrollmentAccount
$accounts = @(@{ ObjectId = "cdf813b6-bdc2-4df5-b150-00ccfd7580e2" })
$accounts = @(@{ ObjectId = "455fd0a7-b04e-4a92-9e1b-d0650c8ba276" })

# Verify the caller has at least one enrollment account.
Assert-True { $accounts.Count -gt 0 }
Expand All @@ -31,3 +31,21 @@ function Test-NewSubscription
Assert-AreEqual $myNewSubName $newSub.Name
Assert-NotNull $newSub.SubscriptionId
}

function Test-UpdateRenameSubscription
{
$subId = "21cba39d-cbbc-487f-9749-43c5c960f269"

$updateSub = Update-AzSubscription -SubscriptionId $subId -Action "Rename" -Name "RenameFromPowershell"

Assert-NotNull updateSub.SubscriptionId
}

function Test-UpdateCancelSubscription
{
$subId = "21cba39d-cbbc-487f-9749-43c5c960f269"

$updateSub = Update-AzSubscription -SubscriptionId $subId -Action "Cancel"

Assert-NotNull updateSub.SubscriptionId
}
Loading