dsccommunity / SqlServerDsc

This module contains DSC resources for deployment and configuration of Microsoft SQL Server.
MIT License
360 stars 225 forks source link

SqlServerDsc: Initial integration tests for commands #2028

Closed johlju closed 6 months ago

johlju commented 6 months ago

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 84.84848% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 94%. Comparing base (026647c) to head (5385af0). Report is 2 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028/graphs/tree.svg?width=650&height=150&src=pr&token=2L5l2Zcoqd&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity)](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) ```diff @@ Coverage Diff @@ ## main #2028 +/- ## ==================================== - Coverage 94% 94% -1% ==================================== Files 93 94 +1 Lines 7862 7919 +57 ==================================== + Hits 7442 7489 +47 - Misses 420 430 +10 ``` | [Flag](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | `94% <84%> (-1%)` | :arrow_down: | | [Files](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | Coverage Δ | | |---|---|---| | [...dules/SqlServerDsc.Common/SqlServerDsc.Common.psm1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FModules%2FSqlServerDsc.Common%2FSqlServerDsc.Common.psm1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL01vZHVsZXMvU3FsU2VydmVyRHNjLkNvbW1vbi9TcWxTZXJ2ZXJEc2MuQ29tbW9uLnBzbTE=) | `96% <ø> (ø)` | | | [source/Public/Add-SqlDscNode.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FAdd-SqlDscNode.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9BZGQtU3FsRHNjTm9kZS5wczE=) | `100% <100%> (ø)` | | | [source/Public/Complete-SqlDscFailoverCluster.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FComplete-SqlDscFailoverCluster.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9Db21wbGV0ZS1TcWxEc2NGYWlsb3ZlckNsdXN0ZXIucHMx) | `100% <100%> (ø)` | | | [source/Public/Complete-SqlDscImage.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FComplete-SqlDscImage.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9Db21wbGV0ZS1TcWxEc2NJbWFnZS5wczE=) | `100% <100%> (ø)` | | | [source/Public/Initialize-SqlDscRebuildDatabase.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FInitialize-SqlDscRebuildDatabase.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9Jbml0aWFsaXplLVNxbERzY1JlYnVpbGREYXRhYmFzZS5wczE=) | `100% <100%> (ø)` | | | [source/Public/Install-SqlDscServer.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FInstall-SqlDscServer.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9JbnN0YWxsLVNxbERzY1NlcnZlci5wczE=) | `100% <100%> (ø)` | | | [source/Public/Remove-SqlDscNode.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FRemove-SqlDscNode.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9SZW1vdmUtU3FsRHNjTm9kZS5wczE=) | `100% <100%> (ø)` | | | [source/Public/Repair-SqlDscServer.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FRepair-SqlDscServer.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9SZXBhaXItU3FsRHNjU2VydmVyLnBzMQ==) | `100% <100%> (ø)` | | | [source/Public/Uninstall-SqlDscServer.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPublic%2FUninstall-SqlDscServer.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1B1YmxpYy9Vbmluc3RhbGwtU3FsRHNjU2VydmVyLnBzMQ==) | `100% <100%> (ø)` | | | [source/Private/Invoke-SetupAction.ps1](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree&filepath=source%2FPrivate%2FInvoke-SetupAction.ps1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL1ByaXZhdGUvSW52b2tlLVNldHVwQWN0aW9uLnBzMQ==) | `90% <60%> (-2%)` | :arrow_down: | | ... and [1 more](https://app.codecov.io/gh/dsccommunity/SqlServerDsc/pull/2028?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | |
johlju commented 6 months ago

This integration test is good enough for now, it can be improved upon in the future, but should be a good starting point for creating additional test for other commands.