feat: 🎸 Add sqlite handler and parser (#2933)

* feat: 🎸 Add sqlite handler and parser

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17410
This commit is contained in:
Zhihe Li committed 2025-09-03 11:41:41 -04:00
1 parent 8abed1a809
commit e0982da744
33 files changed
+1692 -111

No files matched your search

@@ -0,0 +1,37 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { v4 as uuidv4 } from 'uuid';
/**
* This test helper can help set up and cleanup the database in your tests.
*
* ```js
* import { setupSqlite } from 'api/test-support/helpers/sqlite';
*
* module('Acceptance | my test', function(hooks) {
* setupApplicationTest(hooks);
* setupSqlite(hooks);
*
* // add your actual tests here
* });
* ```
*
* @param hooks
*/
export function setupSqlite(hooks) {
hooks.beforeEach(async function () {
const sqliteDb = this.owner.lookup('service:sqlite');
await sqliteDb.setup(`test-sqlite-${uuidv4()}`);
});
hooks.afterEach(async function () {
const sqliteDb = this.owner.lookup('service:sqlite');
await sqliteDb.deleteDatabase();
});
}
export default setupSqlite;