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

Pester Tests Need to be implemented for all existing Modules #92

Closed
aultt opened this issue Aug 2, 2016 · 21 comments
Closed

Pester Tests Need to be implemented for all existing Modules #92

aultt opened this issue Aug 2, 2016 · 21 comments
Labels
enhancement The issue is an enhancement request.

Comments

@aultt
Copy link
Contributor

aultt commented Aug 2, 2016

We need additional people to help write Pester tests. This is a requirement to take the resource out of experimental status.

@johlju
Copy link
Member

johlju commented Aug 2, 2016

Note: We are also discussing mocking in issue #90

@kwirkykat kwirkykat added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Aug 2, 2016
@johlju
Copy link
Member

johlju commented Aug 4, 2016

I on task to fix tests for xSQLServerEndpointState, xSQLServerAvailabilityGroupListener and xSQLServerEndpointPermission.

@aultt
Copy link
Contributor Author

aultt commented Aug 5, 2016

xSQLServerPermission is also failing in the build. Doesn't look like it was tested when you did the intial push

@johlju
Copy link
Member

johlju commented Aug 5, 2016

The test was actually tested successfully by AppVoyer. The PR did not fail the tests (it wouldn't been merged otherwise I belive). Strange that it fails when it's tested together with your new tests. Does all tests work together in your dev environment?

@mbreakey3 Can you see why the tests fail? The error message (the types) failling from the resource aren't anywhere close to what's used in the resource. So it feels strange.

@mbreakey3
Copy link
Contributor

Yeah, so the build that shows up for xSqlServer is actually from Master, not Dev. John's merge did run successfully actually. We're still looking into other causes for why this might be happening.

@johlju
Copy link
Member

johlju commented Aug 5, 2016

I have a new test finished (one, of the three I set out to do, is done). I can send in a PR of that test I got if that helps to debug.
Otherwise I wait until I got all three ready. :)

@mbreakey3
Copy link
Contributor

Is it for one of the resources that already has a test file?

@johlju
Copy link
Member

johlju commented Aug 5, 2016

No, it's a new one, for the resource xSQLServerEndpointState

@johlju
Copy link
Member

johlju commented Aug 5, 2016

Correction. It will send in a new version of the existing test as well, because I did small changes in it.

@mbreakey3
Copy link
Contributor

Okay, I think it would probably be best to just roll it into one PR once you finish the other tests, and we'll try to get this issue figured out in the mean time.

@johlju
Copy link
Member

johlju commented Aug 5, 2016

Will do. Fixing rest of the test.

@aultt
Copy link
Contributor Author

aultt commented Aug 8, 2016

Currently have xSQLAOGroupJoin test complete moving on the xSQLDatabaseRecoveryModel next then to xSQLServerAlwayONService and working the way down the list.

@johlju
Copy link
Member

johlju commented Aug 14, 2016

New test in PR #106 for xSqlServerLogin

@johlju
Copy link
Member

johlju commented Aug 18, 2016

Working on a test for xSQLServerDatabaseRole. Will PR this weekend.

@luigilink
Copy link
Contributor

New test in PR #138 for MSFT_xSQLServerDatabaseOwner

@luigilink
Copy link
Contributor

New test in PR #140 for MSFT_xSQLServerDatabasePermissions

@johlju
Copy link
Member

johlju commented Sep 30, 2016

@luigilink Great work!! 😄

@nabrond
Copy link
Contributor

nabrond commented Oct 1, 2016

Tests for xSQLServerConfiguration are in PR #143

@luigilink
Copy link
Contributor

luigilink commented Nov 18, 2016

@aultt could you add the status of test development in issue description:
17 Pester Test / 28 DSC Resources

  • MSFT_xSQLAOGroupEnsure
  • MSFT_xSQLAOGroupJoin
  • MSFT_xSQLDatabaseRecoveryModel
  • MSFT_xSQLServerAlias
  • MSFT_xSQLServerAlwaysOnService
  • MSFT_xSQLServerAvailabilityGroupListener
  • MSFT_xSQLServerConfiguration
  • MSFT_xSQLServerDatabase
  • MSFT_xSQLServerDatabaseOwner
  • MSFT_xSQLServerDatabasePermissions
  • MSFT_xSQLServerDatabaseRole
  • MSFT_xSQLServerEndpoint
  • MSFT_xSQLServerEndpointPermission
  • MSFT_xSQLServerEndpointState
  • MSFT_xSQLServerFailoverClusterSetup
  • MSFT_xSQLServerFirewall
  • MSFT_xSQLServerLogin
  • MSFT_xSQLServerMaxDop
  • MSFT_xSQLServerMemory
  • MSFT_xSQLServerNetwork
  • MSFT_xSQLServerPermission
  • MSFT_xSQLServerReplication
  • MSFT_xSQLServerRole
  • MSFT_xSQLServerRSConfig
  • MSFT_xSQLServerRSSecureConnectionLevel
  • MSFT_xSQLServerScript
  • MSFT_xSQLServerSetup
  • MSFT_xWaitForAvailabilityGroup

Update:
MSFT_xSQLServerPowerPlan removed from this list
MSFT_xSQLServerAlias renamed
List Updated

@johlju
Copy link
Member

johlju commented Nov 20, 2016

I added those I have in PR.

MSFT_xSQLServerPowerPlan we can skip, it's being moved. So it will be removed from this module as soon it is merged in repo xComputerManagement.

@johlju
Copy link
Member

johlju commented Jan 5, 2017

I closing this issue, and instead I open a new issue for each resource.

@johlju johlju closed this as completed Jan 5, 2017
@vors vors removed the help wanted The issue is up for grabs for anyone in the community. label Jan 5, 2017
johlju added a commit 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

No branches or pull requests

7 participants