Add Oracle to table.spec.ts

This commit is contained in:
Sam Rose 2024-07-30 17:57:21 +01:00
parent d7199c9def
commit cc1e466db9
No known key found for this signature in database
1 changed files with 12 additions and 5 deletions

View File

@ -9,6 +9,7 @@ import {
RelationshipType, RelationshipType,
Row, Row,
SaveTableRequest, SaveTableRequest,
SourceName,
Table, Table,
TableSourceType, TableSourceType,
User, User,
@ -33,7 +34,8 @@ describe.each([
[DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)], [DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
[DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)], [DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
[DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)], [DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
])("/tables (%s)", (_, dsProvider) => { [DatabaseName.ORACLE, getDatasource(DatabaseName.ORACLE)],
])("/tables (%s)", (name, dsProvider) => {
const isInternal: boolean = !dsProvider const isInternal: boolean = !dsProvider
let datasource: Datasource | undefined let datasource: Datasource | undefined
let config = setup.getConfig() let config = setup.getConfig()
@ -52,15 +54,20 @@ describe.each([
jest.clearAllMocks() jest.clearAllMocks()
}) })
it.each([ let names = [
"alphanum", "alphanum",
"with spaces", "with spaces",
"with-dashes", "with-dashes",
"with_underscores", "with_underscores",
'with "double quotes"',
"with 'single quotes'",
"with `backticks`", "with `backticks`",
])("creates a table with name: %s", async name => { ]
if (name !== DatabaseName.ORACLE) {
names.push(`with "double quotes"`)
names.push(`with 'single quotes'`)
}
it.each(names)("creates a table with name: %s", async name => {
const table = await config.api.table.save( const table = await config.api.table.save(
tableForDatasource(datasource, { name }) tableForDatasource(datasource, { name })
) )