@@ -16,7 +16,7 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" {
16
16
Context " Command works with piped input" {
17
17
$netConf = Get-DbaNetworkConfiguration - SqlInstance $script :instance2
18
18
$netConf.TcpIpProperties.KeepAlive = 60000
19
- $results = $netConf | Set-DbaNetworkConfiguration - Confirm:$false
19
+ $results = $netConf | Set-DbaNetworkConfiguration - Confirm:$false - WarningAction SilentlyContinue
20
20
21
21
It " Should Return a Result" {
22
22
$results.ComputerName | Should - Be $netConf.ComputerName
@@ -25,14 +25,18 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" {
25
25
It " Should Return a Change" {
26
26
$results.Changes | Should -Match " Changed TcpIpProperties.KeepAlive to 60000"
27
27
}
28
+
29
+ $netConf = Get-DbaNetworkConfiguration - SqlInstance $script :instance2
30
+ $netConf.TcpIpProperties.KeepAlive = 30000
31
+ $null = $netConf | Set-DbaNetworkConfiguration - Confirm:$false - WarningAction SilentlyContinue
28
32
}
29
33
30
34
Context " Command works with commandline input" {
31
35
$netConf = Get-DbaNetworkConfiguration - SqlInstance $script :instance2
32
36
if ($netConf.NamedPipesEnabled ) {
33
- $results = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - DisableProtocol NamedPipes - Confirm:$false
37
+ $results = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - DisableProtocol NamedPipes - Confirm:$false - WarningAction SilentlyContinue
34
38
} else {
35
- $results = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - EnableProtocol NamedPipes - Confirm:$false
39
+ $results = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - EnableProtocol NamedPipes - Confirm:$false - WarningAction SilentlyContinue
36
40
}
37
41
38
42
It " Should Return a Result" {
@@ -44,9 +48,9 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" {
44
48
}
45
49
46
50
if ($netConf.NamedPipesEnabled ) {
47
- $null = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - EnableProtocol NamedPipes - Confirm:$false
51
+ $null = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - EnableProtocol NamedPipes - Confirm:$false - WarningAction SilentlyContinue
48
52
} else {
49
- $null = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - DisableProtocol NamedPipes - Confirm:$false
53
+ $null = Set-DbaNetworkConfiguration - SqlInstance $script :instance2 - DisableProtocol NamedPipes - Confirm:$false - WarningAction SilentlyContinue
50
54
}
51
55
}
52
56
}
0 commit comments