test(integration): port terminology-alias suite to harperLifecycle - #647
Conversation
Ports 16_terminologyUpdates.mjs — validates that `database` is accepted as an alias for `schema` and `primary_key` for `hash_attribute` across all CRUD, search, attribute, and async-job operations. Uses awaitJobCompleted instead of raw sleeps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
||
| // Resolve the CSV fixture path relative to this file so Harper can read it. | ||
| const SUPPLIERS_CSV = path.join(fileURLToPath(import.meta.url), '../../data/Suppliers.csv'); | ||
|
|
There was a problem hiding this comment.
The path is wrong. fileURLToPath(import.meta.url) returns the file path, not its directory, so path.join treats terminology.test.mjs as a path segment and ../../ walks two levels up — landing at integrationTests/data/Suppliers.csv, which doesn't exist. The CSV is at integrationTests/apiTests/data/Suppliers.csv.
Use path.dirname first (the same idiom used in envConfig.mjs):
| const SUPPLIERS_CSV = path.join(path.dirname(fileURLToPath(import.meta.url)), 'data/Suppliers.csv'); |
Without this fix the three csv_file_load tests will fail with a file-not-found error.
There was a problem hiding this comment.
Fixed: changed to path.join(path.dirname(fileURLToPath(import.meta.url)), 'data/Suppliers.csv'). — Claude
|
Reviewed; no blockers found. The CSV path fix from the prior run ( |
fileURLToPath(import.meta.url) returns the file, not its directory; path.join on a file path produces a wrong CSV location. Use path.dirname() first so the CSV resolves to integrationTests/apiTests/data/. Also apply prettier formatting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
16_terminologyUpdates.mjsto the isolated@harperfast/integration-testingframeworkdatabaseis accepted as an alias forschemaandprimary_keyforhash_attributeacross all CRUD, search, attribute-management, and async-job operationssetTimeoutpolling withawaitJobCompleted; CSV fixture resolved viaimport.meta.urlcsv_url_loadtests remain skipped (require external infrastructure, same as legacy)Test plan
🤖 Generated with Claude Code