Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Oct 21, 2024
1 parent 0cbc16a commit d27e2ed
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/Measure-DbaDiskSpaceRequirement.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ $global:TestConfig = Get-TestConfig

Describe "$CommandName Unit Tests" -Tag 'UnitTests' {
Context "Validate parameters" {
[object[]]$params = (Get-Command $CommandName).Parameters.Keys | Where-Object {$_ -notin ('whatif', 'confirm')}
[object[]]$params = (Get-Command $CommandName).Parameters.Keys | Where-Object { $_ -notin ('whatif', 'confirm') }
[object[]]$knownParameters = 'Source', 'Database', 'SourceSqlCredential', 'Destination', 'DestinationDatabase', 'DestinationSqlCredential', 'Credential', 'EnableException'
$knownParameters += [System.Management.Automation.PSCmdlet]::CommonParameters
It "Should only contain our specific parameters" {
(@(Compare-Object -ReferenceObject ($knownParameters | Where-Object {$_}) -DifferenceObject $params).Count ) | Should Be 0
(@(Compare-Object -ReferenceObject ($knownParameters | Where-Object { $_ }) -DifferenceObject $params).Count ) | Should Be 0
}
}
}
Expand All @@ -31,18 +31,18 @@ Describe "$commandname Integration Tests" -Tags "IntegrationTests" {
It "Should be sourced from Master" {
$r.SourceDatabase | Should -Be $Options.Database
}
It "Should be sourced from the instance $($TestConfig.instance1)" {
$r.SourceSqlInstance | Should -Be $server1.SqlInstance
It "Should be sourced from the correct instance" {
$r.SourceSqlInstance.InstanceName | Should -Be $server1.InstanceName
}
It "Should be destined for Dbatoolsci_DestinationDB" {
$r.DestinationDatabase | Should -Be $Options.DestinationDatabase
}
It "Should be destined for the instance $($TestConfig.instance2)" {
$r.DestinationSqlInstance | Should -Be $server2.SqlInstance
It "Should be destined for the correct instance" {
$r.DestinationSqlInstance.InstanceName | Should -Be $server2.InstanceName
}
It "Should be have files on source" {
It "Should have files on source" {
$r.FileLocation | Should Be "Only on Source"
}
}
}
}
}

0 comments on commit d27e2ed

Please sign in to comment.