Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPSearchCrawlerImpactRule: Does throw if Rule does not exist. #1445

Merged

Conversation

ChristophHannappel
Copy link
Contributor

@ChristophHannappel ChristophHannappel commented Dec 23, 2024

Pull Request (PR) description

The Ressource threw an error if the Crawler Impact Rule did not exist.

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 added/updated in README.md.
  • Resource parameter descriptions added/updated in README.md, schema.mof and comment-based
    help.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Community Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
  • New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

@ChristophHannappel
Copy link
Contributor Author

I did some changes to the unit tests:

  • The Unit Tests used an URI as Parameter Name. But according to the documentation only the Hostname is needed

    Type the name of a site. Do not include the protocol (for example 'http://').

  • The Mocked Get-SPEnterpriseSearchSiteHitRule returned the wrong properties
  • Fixed some logic errors: Where the test is should exist and does exist - than probes if the Set-SPEnterpriseSearchSiteHitRule gets called and expects an Abenst on the Get Method

@ChristophHannappel ChristophHannappel marked this pull request as ready for review December 27, 2024 14:01
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84%. Comparing base (fd20715) to head (9965010).
Report is 6 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1445   +/-   ##
======================================
- Coverage      84%     84%   -1%     
======================================
  Files         145     145           
  Lines       22809   22809           
======================================
- Hits        19246   19244    -2     
- Misses       3563    3565    +2     
Files with missing lines Coverage Δ
...wlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 92% <100%> (-2%) ⬇️

Copy link
Member

@ykuijs ykuijs left a comment

Choose a reason for hiding this comment

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

LGTM

@ykuijs ykuijs merged commit e039c98 into dsccommunity:master Dec 27, 2024
10 checks passed
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.

SPSearchCrawlerImpactRule: Get-TargetResource throws if Impact Rule does not exist
2 participants