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

SqlServerDsc: Use ResourceBase from DscResource.Base #1826

Merged
merged 4 commits into from
Jan 3, 2023

Conversation

johlju
Copy link
Member

@johlju johlju commented Dec 31, 2022

Pull Request (PR) description

  • SqlServerDsc
    • Class-based resources now uses the parent class ResourceBase from the
      module DscResource.Base (issue SqlServerDsc: Try move ResourceBase into a seperate module so if can easily be reused by other modules #1790).
    • Removed private function Test-ResourceDscPropertyIsAssigned and
      Test-ResourceHasDscProperty. Both are replaced by Test-DscProperty
      which is now part of the module DscResource.Common.
    • Removed private function Get-DscProperty. It is replaced by Get-DscProperty
      which is now part of the module DscResource.Common.
    • The class ResourceBase and Reason has been removed, they are now
      part of the module DscResource.Base.
    • The enum Ensure has been removed, is is now part of the module
      DscResource.Base.
    • The private functions that the class ResourceBase depended on has been
      moved to the module DscResource.Base.
      • ConvertFrom-CompareResult
      • ConvertTo-Reason
      • Get-ClassName
      • Get-LocalizedDataRecursive

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 added the needs review The pull request needs a code review. label Dec 31, 2022
@codecov
Copy link

codecov bot commented Dec 31, 2022

Codecov Report

Merging #1826 (92bb58f) into main (2408ab5) will decrease coverage by 0%.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           main   #1826    +/-   ##
=====================================
- Coverage    91%     91%    -1%     
=====================================
  Files        79      71     -8     
  Lines      7410    7272   -138     
=====================================
- Hits       6758    6620   -138     
  Misses      652     652            
Flag Coverage Δ
unit 91% <100%> (-1%) ⬇️
Impacted Files Coverage Δ
source/prefix.ps1 100% <ø> (ø)
source/Classes/011.SqlResourceBase.ps1 90% <100%> (ø)
source/Classes/020.SqlAudit.ps1 100% <100%> (ø)
source/Classes/020.SqlDatabasePermission.ps1 100% <100%> (ø)
source/Classes/020.SqlPermission.ps1 100% <100%> (ø)

Copy link
Member Author

@johlju johlju left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 29 of 30 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @johlju)

@johlju johlju merged commit 914c53c into dsccommunity:main Jan 3, 2023
@johlju johlju deleted the f/remove-resourcebase branch January 3, 2023 08:59
@johlju johlju removed needs review The pull request needs a code review. PR extra large labels Jan 3, 2023
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.

SqlServerDsc: Try move ResourceBase into a seperate module so if can easily be reused by other modules
1 participant