[Sample-Platform] Enforce Foreign Key Constraint on Unittests
Introduction
CCExtractor is a tool to extract subtitles/closed captions from video streams. In order to verify that changes to the code don't break previous samples with issues, we created a test suite. To run this whenever a pull request on GitHub is opened, or when a commit is made, we created the Sample Platform (often abbreviated as SP), which is a website where users can submit faulty samples, and which kicks off the test suite on different platforms.
The task
In sample platform, Unit-tests are using sqlite. SQLite supports FOREIGN KEY syntax when emitting CREATE statements for tables, however by default these constraints have no effect on the operation of the table. So we need to add this constraint manually while initializing sql engine.
Requirements to complete this task
We expect an opened pull request, which contains the modification requested above, unit tests that cover (most of) the changes, and documentation where necessary.