-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
Find-DbaInstance - Fix regex for UDP Search #9072
Conversation
fix issues 9071
Test checks look strange. It is expected that a boolean variable will be sent into check pipeline, but the test setups two sql instances SQL2008R2SP2 and SQL2016, so array of bools is sent into pipeline. |
try to fix test
Perhaps it would be better if we check not the specific value (true or false) of the boolean variables $results.TcpConnected and $results.SqlConnected, but its type, since the main thing for us is that the sql browser response string is parsed correctly. In this case we can check type of $results.TcpConnected and $results.SqlConnected in foreach loop for all sql instances on the test host. |
@@ -24,9 +24,9 @@ Describe "$CommandName Integration Tests" -Tag "IntegrationTests" { | |||
Context "Command finds SQL Server instances" { | |||
BeforeAll { | |||
if ($env:APPVEYOR) { | |||
$results = Find-DbaInstance -ComputerName $script:instance3 -ScanType Browser, SqlConnect | |||
$results = Find-DbaInstance -ComputerName $script:instance3 -ScanType Browser, SqlConnect | Select-Object -First 1 |
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.
I'd prefer this be filtering on the actual $instance3
database service and not randomly picking whatever comes first in the list.
If we do that then the whole if/else block can be removed because it would match no matter the environment.
Thanks everyone! Apologies for the delay, that code signing cert debacle took forever but was just resolved moments ago. I'm going to be doing a release today under 2.1.0 and dthis will be included |
fix issues 9071
Please read -- recent changes to our repo
On November 10, 2022, we removed some bloat from our repository (for the second and final time). This change requires that all contributors reclone or refork their repo.
PRs from repos that have not been recently reforked or recloned will be closed and @potatoqualitee will cherry-pick your commits and open a new PR with your changes.
Type of Change
.\tests\manual.pester.ps1
)Purpose
Approach
Commands to test
Screenshots
Learning