Skip to content

Commit d58334a

Browse files
committedAug 26, 2016
stupidly forgot these in the last commit
Cleaning up some errors thrown in UAT
1 parent 4f0e295 commit d58334a

4 files changed

+4
-6
lines changed
 

Diff for: ‎Functions/function-Restore-Database.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
$null = $restore.RelocateFiles.add($f)
5353
}
5454
if ($backup.LastLSN -eq $BackupsObject[-1].LastLSN){
55-
Write-Verbose "Remove-Database - At endpoint, start recovery "
55+
Write-Verbose "Restore-Database - At endpoint, start recovery "
5656
$restore.NoRecovery = $False
5757
}else{
5858
$restore.NoRecovery = $True

Diff for: ‎Functions/function-Test-DatabaseExists.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
[Parameter(Mandatory=$True)]
2222
[Microsoft.SqlServer.Management.Smo.SqlSmoObject]$RestoreSQLServer
2323
)
24-
if ($sqlconn.Databases.Contains($DatabaseName)){
24+
if ($RestoreSQLServer.Databases.Contains($DatabaseName)){
2525
return $true
2626
} else {
2727
return $false

Diff for: ‎SQLAutoRestores.psm1

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Export-ModuleMember Get-RandomElement
2929
Export-ModuleMember Get-RestoreSet
3030
Export-ModuleMember Remove-Database
3131
Export-ModuleMember Restore-Database
32-
Export-ModuleMember Test-Database
32+
Export-ModuleMember Test-Database
33+
Export-ModuleMember Test-DatabaseExists
3334
Export-ModuleMember Test-DatabaseVersion
3435
Export-ModuleMember Test-RestoreSpace
3536
Export-ModuleMember Restore-SQLBackupHeader

Diff for: ‎UnitTests/function-New-SQLConnection.Tests.ps1

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ Describe 'Get-BottomFolders UAT' -tags 'UAT'{
2121
It "should return a useable SQL connection" {
2222
$SQL2012conn | Should BeOfType Microsoft.SQLServer.Management.Smo.Server
2323
}
24-
It "Should be a 2016 connection" {
25-
$SQL2012conn.Processors | Should BeGreaterThan 0
26-
}
2724
It "Should throw on a bad connection" {
2825
$sqlBADconn = New-SQLConnection -ServerInstance localhost\badinstance
2926
$SQLBADconn.Processors | Should Throw

0 commit comments

Comments
 (0)
Please sign in to comment.