mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 08:28:44 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user