This repository was archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
This repository was archived by the owner on Feb 24, 2021. It is now read-only.
Remove the workaround code that was added for the missing AppVeyor cmdlet #300
Copy link
Copy link
Open
Labels
enhancementThe issue is an enhancement request.The issue is an enhancement request.help wantedThe issue is up for grabs for anyone in the community.The issue is up for grabs for anyone in the community.
Description
Details of the problem, bug, or enhancement
It looks like the cmdlet Add-AppveyorTest now should work on PS Core since the issue appveyor/ci#2263 was closed. I have not tested. But if it works, then the following code could be simplified.
DscResource.Tests/AppVeyor.psm1
Lines 854 to 881 in ab96f03
| if ($PSVersionTable.PSEdition -eq 'Core') | |
| { | |
| $requestObject = @{ | |
| testName = $addAppVeyorTestParameters.Name | |
| testFramework = $addAppVeyorTestParameters.Framework | |
| fileName = $addAppVeyorTestParameters.Filename | |
| outcome = $addAppVeyorTestParameters.Outcome | |
| durationMilliseconds = $addAppVeyorTestParameters.Duration | |
| } | |
| if ($result.FailureMessage) | |
| { | |
| $requestObject['ErrorMessage'] = $addAppVeyorTestParameters.ErrorMessage | |
| $requestObject['ErrorStackTrace'] = $addAppVeyorTestParameters.ErrorStackTrace | |
| } | |
| <# | |
| ConvertTo-Json will handle all escaping for us, like escaping | |
| double quotes and backslashes. | |
| #> | |
| $requestBody = $requestObject | ConvertTo-Json | |
| Invoke-RestMethod -Method Post -Uri "$env:APPVEYOR_API_URL/api/tests" -Body $requestBody -ContentType 'application/json' | Out-Null | |
| } | |
| else | |
| { | |
| Add-AppveyorTest @addAppVeyorTestParameters | |
| } |
Verbose logs showing the problem (if applicable)
n/a
Suggested solution to the issue
Remove the workaround code that was added for the missing AppVeyor cmdlet.
Metadata
Metadata
Assignees
Labels
enhancementThe issue is an enhancement request.The issue is an enhancement request.help wantedThe issue is up for grabs for anyone in the community.The issue is up for grabs for anyone in the community.