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-DbaLastBackup - Added ReuseSourceFolderStructure #7354

Merged

Conversation

andreasjordan
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • New feature (non-breaking change, adds functionality, fixes Extend Parameter options of Test-DbaLastBackup #3893 )
  • 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

Copy from issue: Bring the parameter ReuseSourceFolderStructure from Restore-DbaDatabase to Test-DbaLastBackup. This facilitates the restore of databases with multiple data files spanned across different disks to keep a consistent restore test.

Not tested!

@potatoqualitee
Copy link
Member

Hey @andreasjordan - could this be solved instead by not testing for ReuseSourceFolderStructure but instead adding ReuseSourceFolderStructure = $ReuseSourceFolderStructure so even if it's not set, it'll just pass ReuseSourceFolderStructure = $false. That way, there would be less code, too.

@andreasjordan
Copy link
Contributor Author

I tried that first, but then Test-Bound in Restore-DbaDatabase throws an error about incompatible bound parameters. Thats why I needed a second commit.

@potatoqualitee
Copy link
Member

ah ha! k, then looks great and tests pass 🥳

@potatoqualitee potatoqualitee merged commit 90c964b into development May 26, 2021
@potatoqualitee potatoqualitee deleted the 3893_TestDbaLastBackup_ReuseSourceFolderStructure branch May 26, 2021 14:41
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.

Extend Parameter options of Test-DbaLastBackup
2 participants