Skip to content

SqlServerDsc: Fix Pester 6 syntax in integration tests - #2468

Merged
johlju merged 1 commit into
mainfrom
fix/sql-role-integ-test
Jul 12, 2026
Merged

SqlServerDsc: Fix Pester 6 syntax in integration tests#2468
johlju merged 1 commit into
mainfrom
fix/sql-role-integ-test

Conversation

@johlju

@johlju johlju commented Jul 12, 2026

Copy link
Copy Markdown
Member

Pull Request (PR) description

  • SqlServerDsc
    • Some integration tests still wasn't converted correctly to Pester 6 syntax

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Resource documentation updated in the resource's README.md.
  • Resource parameter descriptions updated in schema.mof.
  • Comment-based help updated, including parameter descriptions.
  • Localization strings updated.
  • Examples updated.
  • Unit tests updated. See DSC Community Testing Guidelines.
  • Integration tests updated (where possible). See DSC Community Testing Guidelines.
  • Code changes adheres to DSC Community Style Guidelines.

This change is Reviewable

@johlju
johlju requested a review from a team as a code owner July 12, 2026 10:02
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Integration tests were updated for Pester 6 assertion syntax across SSRS status codes, SQL role member collections, and firewall state values. The changelog records the incomplete Pester 6 conversion.

Changes

Pester 6 integration test updates

Layer / File(s) Summary
SSRS HTTP status assertions
tests/Integration/Resources/DSC_SqlRS_Default.Integration.Tests.ps1
Readiness checks now compare web request status codes as integer 200 values.
SQL role member collection assertions
tests/Integration/Resources/DSC_SqlRole.Integration.Tests.ps1
Role member expectations now use Should-BeCollection with the existing expected members.
Firewall state assertions and changelog
tests/Integration/Resources/DSC_SqlWindowsFirewall.Integration.Tests.ps1, CHANGELOG.md
Firewall expectations now cover null and falsy values, and the changelog notes incomplete Pester 6 test conversions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: fixing Pester 6 syntax in integration tests.
Description check ✅ Passed The description matches the changeset and mentions the integration test Pester 6 conversion issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Line 18: Update the changelog entry to use the grammatically correct “weren’t”
in place of “wasn’t,” preserving the rest of the wording and Pester 6 reference.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 17d0f673-ea5f-41b1-95b1-4cc959a22221

📥 Commits

Reviewing files that changed from the base of the PR and between 846fbeb and 1adec6a.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • tests/Integration/Resources/DSC_SqlRS_Default.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlRole.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlWindowsFirewall.Integration.Tests.ps1

Comment thread CHANGELOG.md
- SqlServerDsc
- Several integration tests wrongly said that the command `Test-DscConfiguration`
return `$true` when it is in fact return the string value `'True'`.
- Some integration tests still wasn't converted correctly to Pester 6 syntax

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the changelog grammar.

Use “Some integration tests still weren’t converted correctly to Pester 6 syntax.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CHANGELOG.md` at line 18, Update the changelog entry to use the grammatically
correct “weren’t” in place of “wasn’t,” preserving the rest of the wording and
Pester 6 reference.

Source: Path instructions

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94%. Comparing base (846fbeb) to head (1adec6a).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2468   +/-   ##
=====================================
  Coverage     94%     94%           
=====================================
  Files        227     227           
  Lines      10871   10871           
=====================================
  Hits       10235   10235           
  Misses       636     636           
Flag Coverage Δ
unit 94% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johlju
johlju merged commit 56ff0ad into main Jul 12, 2026
40 of 41 checks passed
@johlju
johlju deleted the fix/sql-role-integ-test branch July 12, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant