From 7898c173c5026ef47f7a06f6df53b5c65cab338e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 29 Oct 2025 23:33:37 +0100 Subject: [PATCH] test(ocpp20): fix invalid list formats test for read-only FileTransferProtocols --- .../ocpp/2.0/OCPP20VariableManager.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts b/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts index 96afdaf2..90be9d58 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts @@ -1339,7 +1339,15 @@ await describe('OCPP20VariableManager test suite', async () => { }, ])[0] expect(res.attributeStatus).toBe(SetVariableStatusEnumType.Rejected) - expect(res.attributeStatusInfo?.reasonCode).toBe(ReasonCodeEnumType.InvalidValue) + if (lv.name === OCPP20RequiredVariableName.FileTransferProtocols) { + expect(res.attributeStatusInfo?.reasonCode).toBe(ReasonCodeEnumType.ReadOnly) + } else { + expect(res.attributeStatusInfo?.reasonCode).toBe(ReasonCodeEnumType.InvalidValue) + } + if (lv.name === OCPP20RequiredVariableName.FileTransferProtocols) { + // Read-only variable: additionalInfo reflects read-only status, skip format/member detail assertions + continue + } if (pattern === '') { expect(res.attributeStatusInfo?.additionalInfo).toContain('List cannot be empty') } else if (pattern.startsWith(',') || pattern.endsWith(',')) { -- 2.43.0