Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2018 21:59
What would you like to do?
Quick test for blog post
Describe -Name "Should have >= 30 backup files on storage" -Tag 'FilesOnStorage' {
Context -Name "Full backups for LocalTesting" {
It "should have greater than or equal to 30 backup files" {
Get-DbaBackupHistory -SqlInstance localhost\SQLDEV2K14 -Database LocalTesting -Type Full |
Measure-Object |
Select-Object -ExpandProperty Count |
Should -BeGreaterOrEqual 30 -Because "Business reasons say so"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment