PowerShell / DscConfiguration.Tests

Test automation scripts for evaluating the quality of DSC Configurations using Azure virtual machines and Azure Automation DSC.
MIT License
5 stars 11 forks source link

Pester test result file is not cleaned up and fails to upload test result file #26

Open johlju opened 7 years ago

johlju commented 7 years ago

When running locally, the Pester test result is not removed, which results in unit tests failing on second run. Also when running locally there is no point in trying to upload the Pester test result file to AppVeyor.

I suggest that the lines 107-108, lines 215-216 and the lines 243-244 is replaced respectively with

if ($env:APPVEYOR -eq $true)
{
    (New-Object 'System.Net.WebClient').UploadFile("$env:TestResultsUploadURI", `
    (Resolve-Path $testResultsFile))
}

Remove-Item $testResultsFile