This happens when running tests. Happens when using both HttpPipelineAppend and HttpPipelinePrepend.
PS C:\Code\azps-generation\src\Dns> .\test-module.ps1 -Record
Creating isolated process...
Executing all tests in 'C:\Code\azps-generation\src\Dns\test'
Executing script C:\Code\azps-generation\src\Dns\test\Get-AzDnsTestMe.Tests.ps1
Describing Get-AzDnsTestMe
[-] Scenario 577ms
Expected no exception to be thrown, but an exception "There is no Runspace available to run scripts in this thread. You can provide one in the DefaultRunspace property of the System.Management.Automation.Runspaces.Runspace type. The script block you attempted to invoke was: param($request,...nse)
}
}
" was thrown from C:\Code\azps-generation\src\Dns\test\Get-AzDnsTestMe.Tests.ps1:9 char:11
+ { New-AzDnsZone -Name www.miyanni.zone -ResourceGroupName miy ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
9: { New-AzDnsZone -Name www.miyanni.zone -ResourceGroupName miyanni-test -Location 'global' } | Should -Not -Throw
at <ScriptBlock>, C:\Code\azps-generation\src\Dns\test\Get-AzDnsTestMe.Tests.ps1: line 9
Tests completed in 1.06s
Tests Passed: 0, Failed: 1, Skipped: 0, Pending: 0, Inconclusive: 0
-------------Done-------------
This happens when running tests. Happens when using both HttpPipelineAppend and HttpPipelinePrepend.