Skip to content

Commit

Permalink
revert name of property back
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveL-MSFT committed Feb 29, 2024
1 parent 17ce5df commit 27f12ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Get-TargetResource {
PublishLocation = $null
ScriptPublishLocation = $null
InstallationPolicy = $null
PackageManagementAdapter = $null
PackageManagementProvider = $null
Trusted = $false
Registered = $false
}
Expand All @@ -33,7 +33,7 @@ function Get-TargetResource {
$returnValue.PublishLocation = 'https://www.powershellgallery.com/api/v2/package/'
$returnValue.ScriptPublishLocation = 'https://www.powershellgallery.com/api/v2/package/'
$returnValue.InstallationPolicy = 'Untrusted'
$returnValue.PackageManagementAdapter = 'NuGet'
$returnValue.PackageManagementProvider = 'NuGet'
$returnValue.Trusted = $False
$returnValue.Registered = $True
}
Expand All @@ -55,10 +55,10 @@ function Test-TargetResource {

[Parameter()]
[System.String]
$PackageManagementAdapter
$PackageManagementProvider
)

if (($Name -eq "TestPSRepository1") -and ($PackageManagementAdapter -eq 'NuGet'))
if (($Name -eq "TestPSRepository1") -and ($PackageManagementProvider -eq 'NuGet'))
{
return $true
}
Expand All @@ -78,6 +78,6 @@ function Set-TargetResource {

[Parameter()]
[System.String]
$PackageManagementAdapter
$PackageManagementProvider
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TestPSRepository : OMI_BaseResource
[Write] String PublishLocation;
[Write] String ScriptPublishLocation;
[Write, ValueMap{"Trusted","Untrusted"}, Values{"Trusted","Untrusted"}] String InstallationPolicy;
[Write] String PackageManagementAdapter;
[Write] String PackageManagementProvider;
[Read] Boolean Trusted;
[Read] Boolean Registered;
};
2 changes: 1 addition & 1 deletion powershellgroup/Tests/powershellgroup.resource.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Describe 'PowerShellGroup resource tests' {

It 'Test works on script-based resource' -Skip:(!$IsWindows){

$r = "{'Name':'TestPSRepository1','PackageManagementAdapter':'NuGet'}" | dsc resource test -r PSTestModule/TestPSRepository
$r = "{'Name':'TestPSRepository1','PackageManagementProvider':'NuGet'}" | dsc resource test -r PSTestModule/TestPSRepository
$LASTEXITCODE | Should -Be 0
$res = $r | ConvertFrom-Json
$res.actualState.InDesiredState | Should -Be $True
Expand Down

0 comments on commit 27f12ba

Please sign in to comment.