@@ -47,7 +47,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
47
47
It " should deploy version 1.0 to a new database using -CreateDatabase switch" {
48
48
# drop the database before installing the package
49
49
$null = Invoke-DBOQuery - Type MySQL - SqlInstance $script :mysqlInstance - Silent - Credential $script :mysqlCredential - Database mysql - Query $dropDatabaseScript
50
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v1scripts - CreateDatabase - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent
50
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v1scripts - CreateDatabase - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent
51
51
$testResults.Successful | Should Be $true
52
52
$testResults.Scripts.Name | Should Be (Resolve-Path $v1scripts ).Path
53
53
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -81,7 +81,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
81
81
It " Should throw an error and not create any objects" {
82
82
# Running package
83
83
try {
84
- $null = Install-DBOSqlScript - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod SingleTransaction - Silent
84
+ $null = Install-DBOSqlScript - Absolute - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod SingleTransaction - Silent
85
85
}
86
86
catch {
87
87
$testResults = $_
@@ -104,7 +104,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
104
104
It " Should throw an error and create one object" {
105
105
# Running package
106
106
try {
107
- $null = Install-DBOSqlScript - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod NoTransaction - Silent
107
+ $null = Install-DBOSqlScript - Absolute - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod NoTransaction - Silent
108
108
}
109
109
catch {
110
110
$testResults = $_
@@ -124,7 +124,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
124
124
$null = Invoke-DBOQuery - Type MySQL - SqlInstance $script :mysqlInstance - Silent - Credential $script :mysqlCredential - Database $newDbName - InputFile $cleanupScript
125
125
}
126
126
It " should deploy version 1.0" {
127
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
127
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
128
128
$testResults.Successful | Should Be $true
129
129
$testResults.Scripts.Name | Should Be (Resolve-Path $v1scripts ).Path
130
130
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -148,7 +148,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
148
148
' d' | Should Not BeIn $testResults.name
149
149
}
150
150
It " should deploy version 2.0" {
151
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v2scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
151
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v2scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
152
152
$testResults.Successful | Should Be $true
153
153
$testResults.Scripts.Name | Should Be (Resolve-Path $v2scripts ).Path
154
154
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -177,7 +177,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
177
177
$null = Invoke-DBOQuery - Type MySQL - SqlInstance $script :mysqlInstance - Silent - Credential $script :mysqlCredential - Database $newDbName - InputFile $cleanupScript
178
178
}
179
179
It " should deploy 2.sql before 1.sql" {
180
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v2scripts , $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
180
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v2scripts , $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
181
181
$testResults.Successful | Should Be $true
182
182
$testResults.Scripts.Name | Should Be (Resolve-Path $v2scripts , $v1scripts ).Path
183
183
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -215,7 +215,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
215
215
}
216
216
It " should throw timeout error" {
217
217
try {
218
- $null = Install-DBOSqlScript - Type MySQL - ScriptPath " $workFolder \delay.sql" - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent - ExecutionTimeout 2
218
+ $null = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath " $workFolder \delay.sql" - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent - ExecutionTimeout 2
219
219
}
220
220
catch {
221
221
$testResults = $_
@@ -227,7 +227,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
227
227
$output | Should Not BeLike ' *Successful!*'
228
228
}
229
229
It " should successfully run within specified timeout" {
230
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath " $workFolder \delay.sql" - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent - ExecutionTimeout 6
230
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath " $workFolder \delay.sql" - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent - ExecutionTimeout 6
231
231
$testResults.Successful | Should Be $true
232
232
$testResults.Scripts.Name | Should Be (Join-PSFPath - Normalize " $workFolder \delay.sql" )
233
233
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -246,7 +246,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
246
246
$output | Should BeLike ' *Successful!*'
247
247
}
248
248
It " should successfully run with infinite timeout" {
249
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath " $workFolder \delay.sql" - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent - ExecutionTimeout 0
249
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath " $workFolder \delay.sql" - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - OutputFile " $workFolder \log.txt" - Silent - ExecutionTimeout 0
250
250
$testResults.Successful | Should Be $true
251
251
$testResults.Scripts.Name | Should Be (Join-PSFPath - Normalize " $workFolder \delay.sql" )
252
252
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -273,7 +273,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
273
273
AfterAll {
274
274
}
275
275
It " should deploy nothing" {
276
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent - WhatIf
276
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent - WhatIf
277
277
$testResults.Successful | Should Be $true
278
278
$testResults.Scripts.Name | Should Be $v1scripts
279
279
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -308,7 +308,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
308
308
It " should deploy version 1.0" {
309
309
$before = Invoke-DBOQuery - Type MySQL - SqlInstance $script :mysqlInstance - Silent - Credential $script :mysqlCredential - Database $newDbName - InputFile $verificationScript
310
310
$rowsBefore = ($before | Measure-Object ).Count
311
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent
311
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent
312
312
$testResults.Successful | Should Be $true
313
313
$testResults.Scripts.Name | Should Be (Resolve-Path $v1scripts ).Path
314
314
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -335,7 +335,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
335
335
It " should deploy version 2.0" {
336
336
$before = Invoke-DBOQuery - Type MySQL - SqlInstance $script :mysqlInstance - Silent - Credential $script :mysqlCredential - Database $newDbName - InputFile $verificationScript
337
337
$rowsBefore = ($before | Measure-Object ).Count
338
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v2scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent
338
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v2scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent
339
339
$testResults.Successful | Should Be $true
340
340
$testResults.Scripts.Name | Should Be (Resolve-Path $v2scripts ).Path
341
341
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -370,7 +370,7 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
370
370
It " should deploy version 1.0 without creating SchemaVersions" {
371
371
$before = Invoke-DBOQuery - Type MySQL - SqlInstance $script :mysqlInstance - Silent - Credential $script :mysqlCredential - Database $newDbName - InputFile $verificationScript
372
372
$rowsBefore = ($before | Measure-Object ).Count
373
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent - SchemaVersionTable $null
373
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent - SchemaVersionTable $null
374
374
$testResults.Successful | Should Be $true
375
375
$testResults.Scripts.Name | Should Be (Resolve-Path $v1scripts ).Path
376
376
$testResults.SqlInstance | Should Be $script :mysqlInstance
@@ -399,13 +399,13 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
399
399
Context " deployments with errors should throw terminating errors" {
400
400
BeforeAll {
401
401
$null = Invoke-DBOQuery - Type MySQL - SqlInstance $script :mysqlInstance - Silent - Credential $script :mysqlCredential - Database $newDbName - InputFile $cleanupScript
402
- $null = Install-DBOSqlScript - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent - SchemaVersionTable $null
402
+ $null = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v1scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - Silent - SchemaVersionTable $null
403
403
}
404
404
It " Should return terminating error when object exists" {
405
405
# Running package
406
406
try {
407
407
$testResults = $null
408
- $testResults = Install-DBOSqlScript - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod NoTransaction - Silent
408
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod NoTransaction - Silent
409
409
}
410
410
catch {
411
411
$errorObject = $_
@@ -418,8 +418,8 @@ Describe "Install-DBOSqlScript MySQL integration tests" -Tag $commandName, Integ
418
418
# Running package
419
419
try {
420
420
$testResults = $null
421
- $null = Install-DBOSqlScript - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod NoTransaction - Silent
422
- $testResults = Install-DBOSqlScript - Type MySQL - ScriptPath $v2scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
421
+ $null = Install-DBOSqlScript - Absolute - Type MySQL - Path $tranFailScripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - DeploymentMethod NoTransaction - Silent
422
+ $testResults = Install-DBOSqlScript - Absolute - Type MySQL - ScriptPath $v2scripts - SqlInstance $script :mysqlInstance - Credential $script :mysqlCredential - Database $newDbName - SchemaVersionTable $logTable - Silent
423
423
}
424
424
catch {
425
425
$errorObject = $_
0 commit comments