Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion test/unit/srv/kg-featured-topics-job.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ import cds from '@sap/cds';

describe('kg-featured-topics-job', () => {
beforeAll(async () => {
await cds.deploy(['db/knowledge-graph.cds','db/homepage-featured.cds','db/tutorials.cds','db/missions.cds']).to('sqlite::memory:');
// Deploy the FULL db model, not a hand-picked subset. cds.deploy().to()
// mutates the process-level cds.db/cds.model singleton for the whole vitest
// fork worker; a partial set leaked a schema missing db/schema.cds tables
// (e.g. DeveloperEnvironmentTabs) into later files in the same CI worker,
// crashing the GDPR anonymize cascade's nested-subject SELECT with
// "no such table: DeveloperEnvironmentTabs" (#977 made that SELECT fatal).
// Deploying all of db/ (not srv/) restores every table + @PersonalData
// annotation into the singleton without loading service handlers; the job
// under test only needs an empty DB, so the full model is harmless.
await cds.deploy(['db']).to('sqlite::memory:');
});

it('runs without throwing when inputs are empty', async () => {
Expand Down
Loading