|
| 1 | +export default { |
| 2 | + name: 'refused-authorization', |
| 3 | + description: |
| 4 | + 'Authorization refused three times with the non-Invalid statuses of OCPP 1.6 section 7.2: Blocked, Expired, ConcurrentTx. StartTransaction is not attempted. Expects FAILED_AUTHORIZATION failure.', |
| 5 | + trace: { |
| 6 | + traceId: 'scenario-refused-authorization', |
| 7 | + metadata: { |
| 8 | + stationId: 'CS-SYNTHETIC-017', |
| 9 | + ocppVersion: '1.6', |
| 10 | + source: 'synthetic-scenario', |
| 11 | + description: |
| 12 | + 'Station boots, connector prepares, then three idTags are refused in turn: one Blocked, one Expired, one ConcurrentTx. Section 7.2 marks ConcurrentTx as relevant to StartTransaction, so an Authorize response carrying it is irregular; it is included because the rule treats every non-Accepted status as a refusal wherever it appears. The connector returns to Available without a transaction.', |
| 13 | + }, |
| 14 | + events: [ |
| 15 | + { |
| 16 | + timestamp: '2026-01-15T09:00:00.000Z', |
| 17 | + direction: 'CS_TO_CSMS', |
| 18 | + message: [ |
| 19 | + 2, |
| 20 | + 'msg-001', |
| 21 | + 'BootNotification', |
| 22 | + { |
| 23 | + chargePointVendor: 'SyntheticVendor', |
| 24 | + chargePointModel: 'SM-100', |
| 25 | + chargePointSerialNumber: 'CS-SYNTHETIC-017', |
| 26 | + firmwareVersion: '1.0.0', |
| 27 | + }, |
| 28 | + ], |
| 29 | + }, |
| 30 | + { |
| 31 | + timestamp: '2026-01-15T09:00:00.500Z', |
| 32 | + direction: 'CSMS_TO_CS', |
| 33 | + message: [ |
| 34 | + 3, |
| 35 | + 'msg-001', |
| 36 | + { |
| 37 | + currentTime: '2026-01-15T09:00:00.500Z', |
| 38 | + interval: 300, |
| 39 | + status: 'Accepted', |
| 40 | + }, |
| 41 | + ], |
| 42 | + }, |
| 43 | + { |
| 44 | + timestamp: '2026-01-15T09:00:05.000Z', |
| 45 | + direction: 'CS_TO_CSMS', |
| 46 | + message: [ |
| 47 | + 2, |
| 48 | + 'msg-002', |
| 49 | + 'StatusNotification', |
| 50 | + { connectorId: 0, status: 'Available', errorCode: 'NoError' }, |
| 51 | + ], |
| 52 | + }, |
| 53 | + { |
| 54 | + timestamp: '2026-01-15T09:00:05.500Z', |
| 55 | + direction: 'CSMS_TO_CS', |
| 56 | + message: [3, 'msg-002', {}], |
| 57 | + }, |
| 58 | + { |
| 59 | + timestamp: '2026-01-15T09:00:10.000Z', |
| 60 | + direction: 'CS_TO_CSMS', |
| 61 | + message: [ |
| 62 | + 2, |
| 63 | + 'msg-003', |
| 64 | + 'StatusNotification', |
| 65 | + { connectorId: 1, status: 'Preparing', errorCode: 'NoError' }, |
| 66 | + ], |
| 67 | + }, |
| 68 | + { |
| 69 | + timestamp: '2026-01-15T09:00:10.500Z', |
| 70 | + direction: 'CSMS_TO_CS', |
| 71 | + message: [3, 'msg-003', {}], |
| 72 | + }, |
| 73 | + { |
| 74 | + timestamp: '2026-01-15T09:00:20.000Z', |
| 75 | + direction: 'CS_TO_CSMS', |
| 76 | + message: [2, 'msg-004', 'Authorize', { idTag: 'SYNTHETIC-TAG-201' }], |
| 77 | + }, |
| 78 | + { |
| 79 | + timestamp: '2026-01-15T09:00:20.500Z', |
| 80 | + direction: 'CSMS_TO_CS', |
| 81 | + message: [3, 'msg-004', { idTagInfo: { status: 'Blocked' } }], |
| 82 | + }, |
| 83 | + { |
| 84 | + timestamp: '2026-01-15T09:00:35.000Z', |
| 85 | + direction: 'CS_TO_CSMS', |
| 86 | + message: [2, 'msg-005', 'Authorize', { idTag: 'SYNTHETIC-TAG-202' }], |
| 87 | + }, |
| 88 | + { |
| 89 | + timestamp: '2026-01-15T09:00:35.500Z', |
| 90 | + direction: 'CSMS_TO_CS', |
| 91 | + message: [3, 'msg-005', { idTagInfo: { status: 'Expired' } }], |
| 92 | + }, |
| 93 | + { |
| 94 | + timestamp: '2026-01-15T09:00:50.000Z', |
| 95 | + direction: 'CS_TO_CSMS', |
| 96 | + message: [2, 'msg-006', 'Authorize', { idTag: 'SYNTHETIC-TAG-203' }], |
| 97 | + }, |
| 98 | + { |
| 99 | + timestamp: '2026-01-15T09:00:50.500Z', |
| 100 | + direction: 'CSMS_TO_CS', |
| 101 | + message: [3, 'msg-006', { idTagInfo: { status: 'ConcurrentTx' } }], |
| 102 | + }, |
| 103 | + { |
| 104 | + timestamp: '2026-01-15T09:01:05.000Z', |
| 105 | + direction: 'CS_TO_CSMS', |
| 106 | + message: [ |
| 107 | + 2, |
| 108 | + 'msg-007', |
| 109 | + 'StatusNotification', |
| 110 | + { connectorId: 1, status: 'Available', errorCode: 'NoError' }, |
| 111 | + ], |
| 112 | + }, |
| 113 | + { |
| 114 | + timestamp: '2026-01-15T09:01:05.500Z', |
| 115 | + direction: 'CSMS_TO_CS', |
| 116 | + message: [3, 'msg-007', {}], |
| 117 | + }, |
| 118 | + ], |
| 119 | + }, |
| 120 | + expectedFailures: ['FAILED_AUTHORIZATION'], |
| 121 | + assertions: [{ type: 'failure_count', params: { code: 'FAILED_AUTHORIZATION', min: 3 } }], |
| 122 | +}; |
0 commit comments