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 @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.GuestConfiguration" Version="0.10.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.GuestConfiguration" Version="1.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ public GetVmGuestPolicyReportTests(Xunit.Abstractions.ITestOutputHelper output)
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void VmNameScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyReport-VmNameScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyReport-VmNameScope");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void InitiativeIdScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyReport-InitiativeIdScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyReport-InitiativeIdScope");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void InitiativeNameScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyReport-InitiativeNameScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyReport-InitiativeNameScope");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ReportIdScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyReport-ReportIdScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyReport-ReportIdScope");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
.SYNOPSIS
Get guest configuration policy report by Vm name scope
#>
function Get-AzureRmVMGuestPolicyReport-VmNameScope
function Get-AzVMGuestPolicyReport-VmNameScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$rgName = "vivga"
$vmName = "vivga0"

$reports = Get-AzVMGuestPolicyReport -ResourceGroupName $rgName -VMName $vmName
Assert-NotNull $reports
Expand All @@ -30,11 +30,11 @@ function Get-AzureRmVMGuestPolicyReport-VmNameScope
.SYNOPSIS
Get guest configuration policy report by Initiative id scope
#>
function Get-AzureRmVMGuestPolicyReport-InitiativeIdScope
function Get-AzVMGuestPolicyReport-InitiativeIdScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$initiativeId = "/providers/Microsoft.Authorization/policySetDefinitions/3fa7cbf5-c0a4-4a59-85a5-cca4d996d5a6"
$rgName = "vivga"
$vmName = "vivga0"
$initiativeId = "/providers/Microsoft.Authorization/policySetDefinitions/25ef9b72-4af2-4501-acd1-fc814e73dde1"

$reports = Get-AzVMGuestPolicyReport -ResourceGroupName $rgName -VMName $vmName -InitiativeId $initiativeId
Assert-NotNull $reports
Expand All @@ -45,11 +45,11 @@ function Get-AzureRmVMGuestPolicyReport-InitiativeIdScope
.SYNOPSIS
Get guest configuration policy report by Initiative name scope
#>
function Get-AzureRmVMGuestPolicyReport-InitiativeNameScope
function Get-AzVMGuestPolicyReport-InitiativeNameScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$initiativeName = "3fa7cbf5-c0a4-4a59-85a5-cca4d996d5a6"
$rgName = "vivga"
$vmName = "vivga0"
$initiativeName = "25ef9b72-4af2-4501-acd1-fc814e73dde1"

$reports = Get-AzVMGuestPolicyReport -ResourceGroupName $rgName -VMName $vmName -InitiativeName $initiativeName
Assert-NotNull $reports
Expand All @@ -60,11 +60,16 @@ function Get-AzureRmVMGuestPolicyReport-InitiativeNameScope
.SYNOPSIS
Get guest configuration policy by reportId scope
#>
function Get-AzureRmVMGuestPolicyReport-ReportIdScope
function Get-AzVMGuestPolicyReport-ReportIdScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$reportId= "/subscriptions/b5e4748c-f69a-467c-8749-e2f9c8cd3db0/resourceGroups/VivsGL/providers/Microsoft.Compute/virtualMachines/VivsGL0/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/PasswordMustMeetComplexityRequirements/reports/7421bae4-60f0-4712-a45f-c9c960ffc75c"
$rgName = "vivga"
$vmName = "vivga0"
$initiativeName = "25ef9b72-4af2-4501-acd1-fc814e73dde1"
$reports = Get-AzVMGuestPolicyReport -ResourceGroupName $rgName -VMName $vmName -InitiativeName $initiativeName
Assert-NotNull $reports
Assert-True { $reports.Count -gt 0 }

$reportId= $reports[0].LatestReportId;

$report = Get-AzVMGuestPolicyReport -ReportId $reportId
Assert-NotNull $report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ public GetVmGuestPolicyStatusHistoryTests(Xunit.Abstractions.ITestOutputHelper o
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void VmNameScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyStatusHistory-VmNameScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyStatusHistory-VmNameScope");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void InitiativeIdScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyStatusHistory-InitiativeIdScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyStatusHistory-InitiativeIdScope");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void InitiativeNameScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyStatusHistory-InitiativeNameScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyStatusHistory-InitiativeNameScope");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ShowOnlyChangeSwitchVmNameScope()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmVMGuestPolicyStatusHistory-ShowOnlyChangeSwitch-VmNameScope");
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyStatusHistory-ShowOnlyChangeSwitch-VmNameScope");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
.SYNOPSIS
Get guest configuration policy status history by Vm name scope
#>
function Get-AzureRmVMGuestPolicyStatusHistory-VmNameScope
function Get-AzVMGuestPolicyStatusHistory-VmNameScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$rgName = "vivga"
$vmName = "vivga0"

$historicalStatuses = Get-AzVMGuestPolicyStatusHistory -ResourceGroupName $rgName -VMName $vmName
Assert-NotNull $historicalStatuses
Expand All @@ -30,11 +30,11 @@ function Get-AzureRmVMGuestPolicyStatusHistory-VmNameScope
.SYNOPSIS
Get guest configuration policy status history by Initiative id scope
#>
function Get-AzureRmVMGuestPolicyStatusHistory-InitiativeIdScope
function Get-AzVMGuestPolicyStatusHistory-InitiativeIdScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$initiativeId = "/providers/Microsoft.Authorization/policySetDefinitions/3fa7cbf5-c0a4-4a59-85a5-cca4d996d5a6"
$rgName = "vivga"
$vmName = "vivga0"
$initiativeId = "/providers/Microsoft.Authorization/policySetDefinitions/25ef9b72-4af2-4501-acd1-fc814e73dde1"

$historicalStatuses = Get-AzVMGuestPolicyStatusHistory -ResourceGroupName $rgName -VMName $vmName -InitiativeId $initiativeId
Assert-NotNull $historicalStatuses
Expand All @@ -45,11 +45,11 @@ function Get-AzureRmVMGuestPolicyStatusHistory-InitiativeIdScope
.SYNOPSIS
Get guest configuration policy status history by Initiative name scope
#>
function Get-AzureRmVMGuestPolicyStatusHistory-InitiativeNameScope
function Get-AzVMGuestPolicyStatusHistory-InitiativeNameScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$initiativeName = "3fa7cbf5-c0a4-4a59-85a5-cca4d996d5a6"
$rgName = "vivga"
$vmName = "vivga0"
$initiativeName = "25ef9b72-4af2-4501-acd1-fc814e73dde1"

$historicalStatuses = Get-AzVMGuestPolicyStatusHistory -ResourceGroupName $rgName -VMName $vmName -InitiativeName $initiativeName
Assert-NotNull $historicalStatuses
Expand All @@ -60,10 +60,10 @@ function Get-AzureRmVMGuestPolicyStatusHistory-InitiativeNameScope
.SYNOPSIS
Get guest configuration policy by vmName scope, using ShowOnlyChange switch
#>
function Get-AzureRmVMGuestPolicyStatusHistory-ShowOnlyChangeSwitch-VmNameScope
function Get-AzVMGuestPolicyStatusHistory-ShowOnlyChangeSwitch-VmNameScope
{
$rgName = "VivsGL"
$vmName = "VivsGL0"
$rgName = "vivga"
$vmName = "vivga0"

$historicalStatuses = Get-AzVMGuestPolicyStatusHistory -ResourceGroupName $rgName -VMName $vmName -ShowOnlyChange
Assert-NotNull $historicalStatuses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void RunPowerShellTest(XunitTracingInterceptor logger, params string[] sc
_helper.SetupModules(
AzureModule.AzureResourceManager,
_helper.RMProfileModule,
_helper.GetRMModulePath(@"AzureRM.GuestConfiguration.psd1"),
_helper.GetRMModulePath(@"Az.GuestConfiguration.psd1"),
"ScenarioTests\\Common.ps1",
"ScenarioTests\\" + callingClassName + ".ps1");

Expand Down
Loading