@@ -353,32 +353,32 @@ foreach ($clustervm in $clusters) {
353353 Context " Database availability group status for $ ( $AG.Name ) on $clustername " {
354354 @ ($ag.AvailabilityReplicas.Where { $_.AvailabilityMode -eq ' SynchronousCommit' }).ForEach {
355355 @ (Get-DbaAgDatabase - SqlInstance $psitem.Name - AvailabilityGroup $Ag.Name ).ForEach {
356- It " Database $ ( $psitem.DatabaseName ) should be synchronised on the replica $ ( $psitem.Replica ) " {
356+ It " Database $ ( $psitem.Name ) should be synchronised on the replica $ ( $psitem.sqlInstance ) " {
357357 $psitem.SynchronizationState | Should - Be ' Synchronized' - Because ' The database on the synchronous replica should be synchronised'
358358 }
359- It " Database $ ( $psitem.DatabaseName ) should be failover ready on the replica $ ( $psitem.Replica ) " {
359+ It " Database $ ( $psitem.Name ) should be failover ready on the replica $ ( $psitem.sqlInstance ) " {
360360 $psitem.IsFailoverReady | Should - BeTrue - Because ' The database on the synchronous replica should be ready to failover'
361361 }
362- It " Database $ ( $psitem.DatabaseName ) should be joined on the replica $ ( $psitem.Replica ) " {
362+ It " Database $ ( $psitem.Name ) should be joined on the replica $ ( $psitem.sqlInstance ) " {
363363 $psitem.IsJoined | Should - BeTrue - Because ' The database on the synchronous replica should be joined to the availability group'
364364 }
365- It " Database $ ( $psitem.DatabaseName ) should not be suspended on the replica $ ( $psitem.Replica ) " {
365+ It " Database $ ( $psitem.Name ) should not be suspended on the replica $ ( $psitem.sqlInstance ) " {
366366 $psitem.IsSuspended | Should - Be $False - Because ' The database on the synchronous replica should not be suspended'
367367 }
368368 }
369369 }
370370 @ ($ag.AvailabilityReplicas.Where { $_.AvailabilityMode -eq ' AsynchronousCommit' }).ForEach {
371371 @ (Get-DbaAgDatabase - SqlInstance $PSItem.Name - AvailabilityGroup $Ag.Name ).ForEach {
372- It " Database $ ( $psitem.DatabaseName ) should be synchronising as it is Async on the secondary replica $ ( $psitem.Replica ) " {
372+ It " Database $ ( $psitem.Name ) should be synchronising as it is Async on the secondary replica $ ( $psitem.sqlInstance ) " {
373373 $psitem.SynchronizationState | Should - Be ' Synchronizing' - Because ' The database on the asynchronous secondary replica should be synchronising'
374374 }
375- It " Database $ ( $psitem.DatabaseName ) should not be failover ready on the secondary replica $ ( $psitem.Replica ) " {
375+ It " Database $ ( $psitem.Name ) should not be failover ready on the secondary replica $ ( $psitem.sqlInstance ) " {
376376 $psitem.IsFailoverReady | Should - BeFalse - Because ' The database on the asynchronous secondary replica should be ready to failover'
377377 }
378- It " Database $ ( $psitem.DatabaseName ) should be joined on the secondary replica $ ( $psitem.Replica ) " {
378+ It " Database $ ( $psitem.Name ) should be joined on the secondary replica $ ( $psitem.sqlInstance ) " {
379379 $psitem.IsJoined | Should - BeTrue - Because ' The database on the asynchronous secondary replica should be joined to the availability group'
380380 }
381- It " Database $ ( $psitem.DatabaseName ) should not be suspended on the secondary replica $ ( $psitem.Replica ) " {
381+ It " Database $ ( $psitem.Name ) should not be suspended on the secondary replica $ ( $psitem.sqlInstance ) " {
382382 $psitem.IsSuspended | Should - Be $False - Because ' The database on the asynchronous secondary replica should not be suspended'
383383 }
384384 }
0 commit comments