fix: resolve database integration test issues
- Fix better-sqlite3 import statements to use namespace import - Update test schemas to match actual database schema - Align NodeRepository tests with actual API implementation - Fix FTS5 tests to work with templates instead of nodes - Update mock data to match ParsedNode interface - Fix column names to match actual schema (node_type, package_name, etc) - Add proper ParsedNode creation helper function - Remove tests for non-existent foreign key constraints
This commit is contained in:
@@ -112,8 +112,12 @@ describe('Database Transactions', () => {
|
||||
|
||||
// Insert first node
|
||||
const insertStmt = db.prepare(`
|
||||
INSERT INTO nodes (name, type, display_name, package, version, type_version, data)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)
|
||||
INSERT INTO nodes (
|
||||
node_type, package_name, display_name, description,
|
||||
category, development_style, is_ai_tool, is_trigger,
|
||||
is_webhook, is_versioned, version, documentation,
|
||||
properties_schema, operations, credentials_required
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
`);
|
||||
|
||||
insertStmt.run(
|
||||
@@ -462,8 +466,12 @@ describe('Database Transactions', () => {
|
||||
// Insert initial data
|
||||
const nodes = TestDataGenerator.generateNodes(2);
|
||||
const insertStmt = db.prepare(`
|
||||
INSERT INTO nodes (name, type, display_name, package, version, type_version, data)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)
|
||||
INSERT INTO nodes (
|
||||
node_type, package_name, display_name, description,
|
||||
category, development_style, is_ai_tool, is_trigger,
|
||||
is_webhook, is_versioned, version, documentation,
|
||||
properties_schema, operations, credentials_required
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
`);
|
||||
|
||||
nodes.forEach(node => {
|
||||
|
||||
Reference in New Issue
Block a user