Skip to content

Commit 370a178

Browse files
committed
test(Database): clean up migrations_lock table to prevent test state leakage
1 parent f0c534d commit 370a178

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎tests/system/Database/Live/MetadataTest.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ protected function setUp(): void
3434
{
3535
parent::setUp();
3636

37+
Database::forge($this->DBGroup)->dropTable('migrations_lock', true);
38+
3739
$prefix = $this->db->getPrefix();
3840

3941
$tables = [

‎tests/system/Database/Migrations/MigrationRunnerTest.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ protected function tearDown(): void
7272
// To delete data with `$this->regressDatabase()`, set it true.
7373
$this->migrate = true;
7474
$this->regressDatabase();
75+
Database::forge($this->DBGroup)->dropTable('migrations_lock', true);
7576
}
7677

7778
public function testLoadsDefaultDatabaseWhenNoneSpecified(): void

0 commit comments

Comments
 (0)