Skip to content
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

Open
johlju opened this issue Oct 10, 2018 · 4 comments
Open
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@johlju
Copy link
Contributor

johlju commented Oct 10, 2018

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.

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.

@stale
Copy link

stale bot commented Nov 9, 2018

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Nov 9, 2018
@johlju
Copy link
Contributor Author

johlju commented Nov 11, 2018

I’m planning on fixing this, just haven’t had time yet with vacation and a lot of work at the day job.
Hoping to get a few hours to DSC next week. :)

@stale stale bot removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Nov 11, 2018
@stale
Copy link

stale bot commented Dec 11, 2018

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Dec 11, 2018
@johlju
Copy link
Contributor Author

johlju commented Dec 11, 2018

This should be done to remove unnecessary code.

@PlagueHO can you please tag this issue accordingly?

@stale stale bot removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Dec 11, 2018
@PlagueHO PlagueHO added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants