File tree Expand file tree Collapse file tree
Microsoft.WinGet.Configuration.Engine/Commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ jobs:
520520# Build and test PowerShell module
521521
522522- job : ' BuildPowerShellModule'
523- timeoutInMinutes : 240
523+ timeoutInMinutes : 120
524524 dependsOn : ' Build'
525525 condition : succeeded('Build')
526526 variables :
@@ -604,7 +604,7 @@ jobs:
604604 condition : succeededOrFailed()
605605
606606 - task : PowerShell@2
607- displayName : Copy winget logs
607+ displayName : Copy WinGet Logs
608608 inputs :
609609 pwsh : true
610610 targetType : inline
Original file line number Diff line number Diff line change @@ -424,8 +424,7 @@ private async Task InstallDSCv3Package(OpenConfigurationParameters openParams)
424424 this . Write ( StreamType . Information , Resources . ConfigurationInstallDscPackage ) ;
425425
426426 InitialSessionState initialSessionState = InitialSessionState . CreateDefault ( ) ;
427-
428- // initialSessionState.ExecutionPolicy = openParams.ExecutionPolicy;
427+ initialSessionState . ExecutionPolicy = openParams . ExecutionPolicy ;
429428 Runspace runspace = RunspaceFactory . CreateRunspace ( initialSessionState ) ;
430429 runspace . Open ( ) ;
431430 PowerShell installDSCv3 = PowerShell . Create ( runspace ) . AddScript (
Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ BeforeAll {
2222
2323 Import-Module Microsoft.WinGet.Configuration
2424
25- # The msstore source will be used to install DSCv3 package
25+ # TODO: Installing within the test run on the build server (only) somehow causes below error:
26+ # [CORE] Started MSStore package execution. ProductId: 9PCX3HX4HZ0Z PackageFamilyName: Microsoft.DesiredStateConfiguration-Preview_8wekyb3d8bbwe
27+ # [CLI ] MSStore install failed. ProductId: 9PCX3HX4HZ0Z HResult: 0x80010002
28+ # So install the DSCv3 package here.
2629 Import-Module Microsoft.WinGet.Client
30+ $installResult = Install-WingetPackage - Id 9PCX3HX4HZ0Z - Source msstore
31+ if ($installResult.Status -ne ' Ok' )
32+ {
33+ Write-Error " Failed to install DSCv3 package. Status: $ ( $installResult.Status ) . ExtendedErrorCode: $ ( $installResult.ExtendedErrorCode ) ." - ErrorAction Stop
34+ }
2735
2836 function CreatePolicyKeyIfNotExists ()
2937 {
Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ if (-not [System.String]::IsNullOrEmpty($packageLayoutPath))
4444 {
4545 $local :wingetExeName = " wingetdev.exe"
4646 }
47-
47+
4848 $local :settingsExport = ConvertFrom-Json (& $local :wingetExeName settings export)
4949 $local :settingsFilePath = $local :settingsExport.userSettingsFile
50- $local :settingsFileContent = ConvertTo-Json @ { debugging = @ { enableSelfInitiatedMinidump = $true ; keepAllLogFiles = $true } }
50+ $local :settingsFileContent = ConvertTo-Json @ { debugging = @ { enableSelfInitiatedMinidump = $true ; keepAllLogFiles = $true }; experimentalFeatures = @ { dsc3 = $true } }
5151
5252 Set-Content - Path $local :settingsFilePath - Value $local :settingsFileContent
5353}
You can’t perform that action at this time.
0 commit comments