dsccommunity / dsccommunity/SqlServerDsc

SqlServerDsc: Rename/Refactor Test-SkipContinuousIntegrationTask

Open
#1,322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted tests
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.