feat: 🎸 Add sqlite support for credential stores (#2967)
✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17416
This commit is contained in:
1 parent
2154251c30
commit
9e612cf83d
13 files changed
+90
-11
No files matched your search
@@ -7,6 +7,7 @@ import { module, test } from 'qunit';
|
||||
import { setupTest } from 'dummy/tests/helpers';
|
||||
import { setupSqlite } from 'api/test-support/helpers/sqlite';
|
||||
import { modelMapping, searchTables } from 'api/services/sqlite';
|
||||
import { underscore } from '@ember/string';
|
||||
|
||||
const supportedModels = Object.keys(modelMapping);
|
||||
const supportedFtsTables = [...searchTables];
|
||||
@@ -22,7 +23,7 @@ module('Unit | Service | sqlite', function (hooks) {
|
||||
const service = this.owner.lookup('service:sqlite');
|
||||
|
||||
const tableColumns = await service.fetchResource({
|
||||
sql: `SELECT * FROM pragma_table_info('${resource}')`,
|
||||
sql: `SELECT * FROM pragma_table_info('${underscore(resource)}')`,
|
||||
});
|
||||
|
||||
const columnNames = tableColumns.map((column) => column.name);
|
||||
@@ -42,7 +43,7 @@ module('Unit | Service | sqlite', function (hooks) {
|
||||
const service = this.owner.lookup('service:sqlite');
|
||||
|
||||
const tableColumns = await service.fetchResource({
|
||||
sql: `SELECT * FROM pragma_table_info('${resource}_fts')`,
|
||||
sql: `SELECT * FROM pragma_table_info('${underscore(resource)}_fts')`,
|
||||
});
|
||||
|
||||
const columnNames = tableColumns.map((column) => column.name);
|
||||
|
||||
Reference in new issue
Block a user