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

Add Assert-RequiredCommandParameter from SqlServerDsc => DscResource.Common Public Functions #92

Closed
johlju opened this issue Dec 29, 2022 · 0 comments · Fixed by #94
Closed
Labels
enhancement The issue is an enhancement request.

Comments

@johlju
Copy link
Member

johlju commented Dec 29, 2022

Assert-RequiredCommandParameter: Move to DscResource.Common as a public command was created in the SqlServerDsc module under Issue 1796. It was determined this function may better serve the DSC community from the DscResource.Common module.

@johlju johlju added enhancement The issue is an enhancement request. in progress The issue is being actively worked on by someone. labels Dec 29, 2022
johlju added a commit that referenced this issue Dec 30, 2022
…d` (#94)

- Added private function `Assert-RequiredCommandParameter` that throws an
  exception if a specified parameter is not assigned a value, and optionally
  throws only if a specific parameter is passed. - [Issue #92](#92)
  - Related to SqlServerDsc [Issue #1796](dsccommunity/SqlServerDsc#1796).
- Added public function `Test-AccountRequirePassword` that returns true or
  false whether an account need a password to be passed - [Issue #93](#93)
  - Related to SqlServerDsc [Issue #1794](dsccommunity/SqlServerDsc#1794).
- DscResource.Common
  - Updated Visual Studio Code project settings to configure testing for Pester 5.
- `Assert-BoundParameter`
  - Now has a new parameter set that calls `Assert-RequiredCommandParameter`
    which will throw an exception if a specified parameter is not assigned
    a value, and optionally throws only if a specific parameter is passed.
- Fixed unit tests for `Assert-ElevatedUser` and `Test-IsNumericType` so
  the public function is tested correctly using the exported function.
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Dec 30, 2022
johlju added a commit to dsccommunity/SqlServerDsc that referenced this issue Jan 2, 2023
…1828)

- SqlServerDsc
  - Removed `Test-ServiceAccountRequirePassword` from private functions (issue #1794)
    - Replaced by `Test-AccountRequirePassword` that was added to _DscResource.Common_
      public functions ([issue #93](dsccommunity/DscResource.Common#93)).
  - Removed `Assert-RequiredCommandParameter` from private functions (issue #1796).
    - Replaced by `Assert-BoundParameter` (part of _DscResource.Common_)
      that had a new parameter set added ([issue #92](dsccommunity/DscResource.Common#92)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant