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

Test-DbaConnection - added -SkipPSRemoting / fixed getting Port #7353

Merged
merged 6 commits into from
May 26, 2021

Conversation

andreasjordan
Copy link
Contributor

@andreasjordan andreasjordan commented May 22, 2021

Type of Change

  • Bug fix (non-breaking change, fixes [Bug] Test-DBAConnection ignoring -SQLCredential #6157 )
  • New feature (non-breaking change, adds functionality, fixes Test-DbaConnection - PSRemoting #6148 )
  • Breaking change (effects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

image

@potatoqualitee
Copy link
Member

Thank you! DatabaseIsAccessible should be $false and Status Unknown for that last one.

@andreasjordan
Copy link
Contributor Author

I thought it this way: DatabaseIsAccessible and Status are $null, because there is no database "unknown" in the instance. A not-NULL value would indicate, that the database can be found in the SMO.
And Status is of type Microsoft.SqlServer.Management.Smo.DatabaseStatus which has no "Unknown".

A new commit with a refresh on .Databases is on its way to ensure that SMO is up to date when using it.

@potatoqualitee
Copy link
Member

If we're comparing null, the following may be equally useful? if (-not (Get-DbaDatabase -SqlInstance..)

@andreasjordan andreasjordan changed the title Test-DbaConnection - added -Database and -SkipPSRemoting / fixed getting Port Test-DbaConnection - added -SkipPSRemoting / fixed getting Port May 24, 2021
@potatoqualitee
Copy link
Member

Looks good, thank you!

@potatoqualitee potatoqualitee merged commit a6b84dd into development May 26, 2021
@potatoqualitee potatoqualitee deleted the TestDbaConnection_Improvements branch May 26, 2021 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Test-DBAConnection ignoring -SQLCredential Test-DbaConnection - PSRemoting
2 participants