dsccommunity / dsccommunity/SqlServerDsc
SqlServerDsc: Rename/Refactor Test-SkipContinuousIntegrationTask
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
There are a helper function Test-SkipContinuousIntegrationTask it is meant to be used to make sure to only run the test in the correct job when run in the CI.
This would run the integration test when the CI job category (an environment variable) is either 'A' or 'B', and skip the test for any other category.
if (Test-SkipContinuousIntegrationTask -Type 'Integration' -Category @('A','B'))
It would be more logical if the helper function Test-SkipContinuousIntegrationTask would be renamed to something like Test-RunForIntegrationCategory so it says, run the file for category 'A' or 'B'.
But there is also another helper function Test-ContinuousIntegrationTaskCategory, so maybe we don't need the previous helper function, or the previous helper function should use this helper function (I don't think it does today).
If we skip the previous helper function we could achieve the same with the following code
if ((Test-ContinuousIntegrationTaskCategory -Category 'A') `
-or (Test-ContinuousIntegrationTaskCategory -Category 'B'))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the definitions and usages of Test-SkipContinuousIntegrationTask and Test-ContinuousIntegrationTaskCategory. Compare their behavior for integration categories A and B, then determine whether the helpers should be consolidated or renamed. Update the affected CI test calls and verify that integration tests run only in the intended categories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- ci-cd, testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100