Skip to content

Commit 27ccc05

Browse files
committed
updating column names validation for other DBMS
1 parent 7f49d8b commit 27ccc05

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

tests/mysql/Update-DBOSchemaTable.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Describe "Update-DBOSchemaTable MySQL integration tests" -Tag $commandName, Inte
6161

6262
#Verifying SchemaVersions table
6363
$testResults = Invoke-DBOQuery @connParams -Database $newDbName -Query ($verificationQuery -f 'SchemaVersions')
64-
$testResults.column_name | Should -Be @('schemaversionid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
64+
$testResults.column_name | Should -BeIn @('schemaversionid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
6565
}
6666
It "upgrade custom schema table" {
6767
$null = Invoke-DBOQuery @connParams -Database $newDbName -Query ($schemaTableQuery -f $logTable)
@@ -70,7 +70,7 @@ Describe "Update-DBOSchemaTable MySQL integration tests" -Tag $commandName, Inte
7070
$result | Should -BeNullOrEmpty
7171

7272
$testResults = Invoke-DBOQuery @connParams -Database $newDbName -Query ($verificationQuery -f $logTable)
73-
$testResults.column_name | Should -Be @('schemaversionid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
73+
$testResults.column_name | Should -BeIn @('schemaversionid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
7474
}
7575
}
7676
Context "$commandName whatif tests" {
@@ -81,7 +81,7 @@ Describe "Update-DBOSchemaTable MySQL integration tests" -Tag $commandName, Inte
8181
$result | Should -BeNullOrEmpty
8282

8383
$testResults = Invoke-DBOQuery @connParams -Database $newDbName -Query ($verificationQuery -f $logTable)
84-
$testResults.column_name | Should -Be @('schemaversionid', 'scriptname', 'applied')
84+
$testResults.column_name | Should -BeIn @('schemaversionid', 'scriptname', 'applied')
8585
}
8686
}
8787
}

tests/oracle/Update-DBOSchemaTable.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Describe "Update-DBOSchemaTable Oracle integration tests" -Tag $commandName, Int
9191

9292
#Verifying SchemaVersions table
9393
$testResults = Invoke-DBOQuery @connParams -Query ($verificationQuery -f 'SCHEMAVERSIONS')
94-
$testResults.COLUMN_NAME | Should -Be @('SCHEMAVERSIONID', 'SCRIPTNAME', 'APPLIED', 'CHECKSUM', 'APPLIEDBY', 'EXECUTIONTIME')
94+
$testResults.COLUMN_NAME | Should -BeIn @('SCHEMAVERSIONID', 'SCRIPTNAME', 'APPLIED', 'CHECKSUM', 'APPLIEDBY', 'EXECUTIONTIME')
9595
}
9696
It "upgrade custom schema table" {
9797
$null = Invoke-DBOQuery @connParams -Query ($schemaTableQuery -f $logTable)
@@ -100,7 +100,7 @@ Describe "Update-DBOSchemaTable Oracle integration tests" -Tag $commandName, Int
100100
$result | Should -BeNullOrEmpty
101101

102102
$testResults = Invoke-DBOQuery @connParams -Query ($verificationQuery -f $logTable)
103-
$testResults.COLUMN_NAME | Should -Be @('SCHEMAVERSIONID', 'SCRIPTNAME', 'APPLIED', 'CHECKSUM', 'APPLIEDBY', 'EXECUTIONTIME')
103+
$testResults.COLUMN_NAME | Should -BeIn @('SCHEMAVERSIONID', 'SCRIPTNAME', 'APPLIED', 'CHECKSUM', 'APPLIEDBY', 'EXECUTIONTIME')
104104
}
105105
}
106106
Context "$commandName whatif tests" {
@@ -111,7 +111,7 @@ Describe "Update-DBOSchemaTable Oracle integration tests" -Tag $commandName, Int
111111
$result | Should -BeNullOrEmpty
112112

113113
$testResults = Invoke-DBOQuery @connParams -Query ($verificationQuery -f $logTable)
114-
$testResults.COLUMN_NAME | Should -Be @('SCHEMAVERSIONID', 'SCRIPTNAME', 'APPLIED')
114+
$testResults.COLUMN_NAME | Should -BeIn @('SCHEMAVERSIONID', 'SCRIPTNAME', 'APPLIED')
115115
}
116116
}
117117
}

tests/postgresql/Update-DBOSchemaTable.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Describe "Update-DBOSchemaTable Postgresql integration tests" -Tag $commandName,
6565

6666
#Verifying SchemaVersions table
6767
$testResults = Invoke-DBOQuery @connParams -Database $newDbName -Query ($verificationQuery -f 'SchemaVersions')
68-
$testResults.column_name | Should -Be @('schemaversionsid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
68+
$testResults.column_name | Should -BeIn @('schemaversionsid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
6969
}
7070
It "upgrade custom schema table" {
7171
$null = Invoke-DBOQuery @connParams -Database $newDbName -Query ($schemaTableQuery -f $logTable)
@@ -74,7 +74,7 @@ Describe "Update-DBOSchemaTable Postgresql integration tests" -Tag $commandName,
7474
$result | Should -BeNullOrEmpty
7575

7676
$testResults = Invoke-DBOQuery @connParams -Database $newDbName -Query ($verificationQuery -f $logTable)
77-
$testResults.column_name | Should -Be @('schemaversionsid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
77+
$testResults.column_name | Should -BeIn @('schemaversionsid', 'scriptname', 'applied', 'checksum', 'appliedby', 'executiontime')
7878
}
7979
}
8080
Context "$commandName whatif tests" {
@@ -85,7 +85,7 @@ Describe "Update-DBOSchemaTable Postgresql integration tests" -Tag $commandName,
8585
$result | Should -BeNullOrEmpty
8686

8787
$testResults = Invoke-DBOQuery @connParams -Database $newDbName -Query ($verificationQuery -f $logTable)
88-
$testResults.column_name | Should -Be @('schemaversionsid', 'scriptname', 'applied')
88+
$testResults.column_name | Should -BeIn @('schemaversionsid', 'scriptname', 'applied')
8989
}
9090
}
9191
}

0 commit comments

Comments
 (0)