Conversation
SummaryThe following content is AI-generated and provides a summary of the pull request: Fix Integration Tests for HANA CompatibilityBug Fix🐛 Refactored integration tests to work correctly with HANA by replacing the Changes
PR Bot InformationVersion:
💌 Have ideas or want to contribute? Create an issue and share your thoughts with us! Made with ❤️ by Hyperspace. |
There was a problem hiding this comment.
Summary
This PR replaces the data.reset() approach with isolated per-test data creation via a shared testDataProvider.js, and adds audit logging to the hybrid CI workflow. The overall direction is sound, but there are several substantive issues:
-
HANA guard removed from
enhanceModelForDBRestrictions(lib/build/hana-restrictions.js): The function is now called unconditionally inside the HDI migration hook, losing thedb.kind === "hana"guard that existed incds-plugin.js. This may cause HANA-specific CSN mutations in non-HANA builds. -
"eligible for deletion" tests still rely on seed data (
dataSubjectDeletion.test.js): The hardcoded IDs in those assertions ("8e2f2640-6866-4dcf-8f4d-3027aa831cad", etc.) belong to the seed customer. Withdata.reset()gone, if any prior "deletion" test accidentally touches this seed customer, those assertions will silently break. -
Global
DELETE … WHERE "1 = 1"breaks isolation (dataSubjectDeletion.test.js): Two tests delete allILMObjectWithXPRBlockingEnabledrows, which wipes out records created by the outerbeforeEachforemployeeData, potentially causing subsequent tests in the same suite to fail. -
Stale data from the dual-role test: The inserted
EmployeeandILMObjectWithXPRBlockingEnabledrecord created in the "does not consider active records from different role" test are never cleaned up, which can affect subsequent test runs against a persistent DB.
PR Bot Information
Version: 1.20.11 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback
- LLM:
anthropic--claude-4.6-sonnet - File Content Strategy: Full file content
- Correlation ID:
4c2761f0-34f4-11f1-8e19-6268d00b4fff - Event Trigger:
pull_request.opened
cds deploy