From 3e000962554e4dc8b5493d6e0e645c1bb100e034 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 22 Jul 2026 13:58:06 +0100 Subject: [PATCH] One more attempt at tests This was failing on GH but not locally - Locally + SQLite + LazilyRefreshDatabase: Asset::factory()->create() typically gets id=1 (SQLite handles auto-increment inside the rollback-per-test transaction differently). My assoc array [$target->id => '1'] happens to have value '1' which matches the id. Loop runs. Test passes. - MySQL CI full-suite: AUTO_INCREMENT doesn't reset on transaction rollback. After ~2900 tests, my Asset lands at id=2953 (or similar high number). WHERE id IN ('1') matches nothing. Loop skips my asset. Notes never gets updated. Test fails. --- tests/Feature/Fmcs/FmcsStrictBulkAssetEditTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Fmcs/FmcsStrictBulkAssetEditTest.php b/tests/Feature/Fmcs/FmcsStrictBulkAssetEditTest.php index b8e72bdaa2..ac3ae915de 100644 --- a/tests/Feature/Fmcs/FmcsStrictBulkAssetEditTest.php +++ b/tests/Feature/Fmcs/FmcsStrictBulkAssetEditTest.php @@ -34,7 +34,7 @@ class FmcsStrictBulkAssetEditTest extends TestCase $this->actingAs($actor) ->post(route('hardware/bulksave'), [ - 'ids' => [$target->id => '1'], + 'ids' => [$target->id], 'company_id' => 'clear', 'bulk_actions' => 'edit', ]); @@ -56,7 +56,7 @@ class FmcsStrictBulkAssetEditTest extends TestCase $this->actingAs($actor) ->post(route('hardware/bulksave'), [ - 'ids' => [$target->id => '1'], + 'ids' => [$target->id], 'company_id' => 'clear', 'bulk_actions' => 'edit', ]); @@ -92,7 +92,7 @@ class FmcsStrictBulkAssetEditTest extends TestCase $response = $this->actingAs($actor) ->post(route('hardware/bulksave'), [ - 'ids' => [$target->id => '1'], + 'ids' => [$target->id], 'notes' => 'after', 'bulk_actions' => 'edit', ]);