mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-14 05:39:11 +00:00
[release/v7.6.7] Move to the latest Microsoft.PowerShell.Native package and add test (#28176)
This commit is contained in:
1 parent
57d98a40ad
commit
2e2417bf6b
2 files changed
+20
-1
No files matched your search
@@ -43,7 +43,7 @@
|
||||
<PackageReference Include="System.Security.Permissions" Version="10.0.5" />
|
||||
<!-- the following package(s) are from the powershell org -->
|
||||
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.PowerShell.Native" Version="700.0.1" />
|
||||
<PackageReference Include="Microsoft.PowerShell.Native" Version="700.0.2" />
|
||||
<!-- Signing APIs -->
|
||||
<PackageReference Include="Microsoft.Security.Extensions" Version="1.4.0" />
|
||||
<PackageReference Include="System.Windows.Extensions" Version="10.0.5" />
|
||||
|
||||
@@ -403,4 +403,23 @@ Describe "Remoting loopback tests" -Tags @('CI', 'RequireAdminOnWindows') {
|
||||
$session | Remove-PSSession -ErrorAction Ignore
|
||||
}
|
||||
}
|
||||
|
||||
It 'Remote session has up-to-date TPA list' {
|
||||
$session = New-RemoteSession -ConfigurationName $endPoint
|
||||
try {
|
||||
$tpa_remote = Invoke-Command -Session $session -ScriptBlock { [AppContext]::GetData('TRUSTED_PLATFORM_ASSEMBLIES') -split ';' | Sort-Object -Unique }
|
||||
$tpa_local = [AppContext]::GetData('TRUSTED_PLATFORM_ASSEMBLIES') -split ';' | Sort-Object -Unique
|
||||
|
||||
# 2 DLLs are intentionally excluded from the WinRM session side.
|
||||
$diff = Compare-Object -ReferenceObject $tpa_local -DifferenceObject $tpa_remote
|
||||
$diff | Should -HaveCount 2
|
||||
$diff | ForEach-Object SideIndicator | Sort-Object -Unique | Should -Be '<='
|
||||
|
||||
$actualDlls = $diff.InputObject | Split-Path -Leaf
|
||||
$actualDlls | Should -Contain 'Microsoft.PowerShell.GraphicalHost.dll'
|
||||
$actualDlls | Should -Contain 'pwsh.dll'
|
||||
} finally {
|
||||
$session | Remove-PSSession -ErrorAction Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user