From c541bc9239914ddf206c5ea4575d054a20c60015 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 19 Jun 2026 12:47:19 +0530 Subject: [PATCH] fix(tests): point _Test Workstation 1 fixture at an existing warehouse BootStrapTestData.make_workstation() created _Test Workstation 1 referencing the warehouse "_Test warehouse - _TC" (lowercase 'w'), but make_warehouse() never creates that name -- it makes "_Test Warehouse - _TC" (capital W) and others. On MariaDB the lowercase reference resolves to the capital warehouse via the default case-insensitive collation, so it silently works. On PostgreSQL (case-sensitive) the link cannot be found, so on a freshly-bootstrapped site make_workstation() raises LinkValidationError: Could not find Warehouse: _Test warehouse - _TC, which aborts the module-level BootStrapTestData() import and blocks every test extending ERPNextTestSuite. It was masked only on sites where the workstation was already bootstrapped (make_records skips existing) or where the lowercase name happened to exist from legacy data. Point the fixture at the existing "_Test Warehouse - _TC". Verified on a freshly-reset site: the buggy fixture raises the LinkValidationError on Postgres and passes after the fix; MariaDB passes either way. Co-Authored-By: Claude Opus 4.8 (1M context) --- erpnext/tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/tests/utils.py b/erpnext/tests/utils.py index 295ab239c5f..45da506f0fe 100644 --- a/erpnext/tests/utils.py +++ b/erpnext/tests/utils.py @@ -2544,7 +2544,7 @@ class BootStrapTestData: "doctype": "Workstation", "name": "_Test Workstation 1", "workstation_name": "_Test Workstation 1", - "warehouse": "_Test warehouse - _TC", + "warehouse": "_Test Warehouse - _TC", "hour_rate_labour": 25, "hour_rate_electricity": 25, "hour_rate_consumable": 25,