-
Notifications
You must be signed in to change notification settings - Fork 224
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: Integration tests now also run using SQLPS #1932
base: main
Are you sure you want to change the base?
Conversation
af37d49
to
10690ec
Compare
10690ec
to
75632b7
Compare
Codecov Report
@@ Coverage Diff @@
## main #1932 +/- ##
====================================
- Coverage 91% 91% -1%
====================================
Files 92 92
Lines 7810 7816 +6
====================================
+ Hits 7185 7189 +4
- Misses 625 627 +2
|
This change passes with SQL2016 but fails on SQL2017 and abpve with the error below. It could be caused by it loads the wrong SQLPS if it is available. 🤔
Extended log:
|
Removing the SQLPS that was installed on the build worker seemed to not work. Not the build fails with
Guessing that removing the SQLPS module does not help since it does not seem it will find the newly installed module (if it is even installed). An debug attempt would be to search the C: drive for any installed SQLPS module and see if |
The root cause is that
SqlServerDsc/tests/Integration/DSC_SqlSetup.Integration.Tests.ps1 Lines 171 to 175 in f9bde8a
|
This line was added to support module SqlServer for SQL Server 2022, but ut fails in SqlReplication when using SQLPS. SqlServerDsc/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 Lines 440 to 447 in 527dcd4
Fails with:
In the error message it says |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 4 files at r1, 1 of 3 files at r5, 7 of 8 files at r7, 1 of 1 files at r8, 1 of 1 files at r9, all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @github-code-scanning[bot])
RequiredModules.psd1
line 33 at r9 (raw file):
'DscResource.Test' = @{ Version = 'latest'
Should revert this once full release is out.
source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1
line 97 at r5 (raw file):
Previously, github-code-scanning[bot] wrote…
'?' is an alias of 'Where-Object'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
Done.
source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1
line 98 at r5 (raw file):
Previously, github-code-scanning[bot] wrote…
'?' is an alias of 'Where-Object'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
Done.
source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1
line 98 at r5 (raw file):
Previously, github-code-scanning[bot] wrote…
'fl' is an alias of 'Format-List'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
Done.
source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1
line 103 at r5 (raw file):
Previously, github-code-scanning[bot] wrote…
'?' is an alias of 'Where-Object'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
Done.
source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1
line 104 at r5 (raw file):
Previously, github-code-scanning[bot] wrote…
'?' is an alias of 'Where-Object'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
Done.
source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1
line 104 at r5 (raw file):
Previously, github-code-scanning[bot] wrote…
'fl' is an alias of 'Format-List'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 10 of 11 files reviewed, 6 unresolved discussions (waiting on @github-code-scanning[bot])
RequiredModules.psd1
line 33 at r9 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Should revert this once full release is out.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r10, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @github-code-scanning[bot])
So now it fails on an unrelated error. Will see if it fails on main with the same error. Can't see this can b caused by a changde in this PR.
|
/azurepipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azurepipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
This reverts commit ec9a5fc.
Not sure why one of the dbatools jobs no longer find |
The last 4 debug commits should be removed before merging (after comment #1932 (comment) is resolved). The last debug commits fixed one think then broke on another thing. Root cause is that |
Pull Request (PR) description
This Pull Request (PR) fixes the following issues
None.
Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
This change is