|
| 1 | +{ |
| 2 | + "description": "Golden transmit envelopes shared by solid_objects and solid-objects-js. The JS bridge must produce and accept these; SolidObjects::Transmission.receive must accept the valid ones, apply the duplicate pair once, and reject the malformed ones.", |
| 3 | + "valid": [ |
| 4 | + { |
| 5 | + "name": "increment with arguments", |
| 6 | + "envelope": { |
| 7 | + "effectId": "fixture-effect-0001", |
| 8 | + "actorType": "transmit-counters", |
| 9 | + "actorId": "fixture-counter", |
| 10 | + "operation": "increment", |
| 11 | + "arguments": { "amount": 2 } |
| 12 | + }, |
| 13 | + "idempotencyKey": "transmit:fixture-effect-0001" |
| 14 | + }, |
| 15 | + { |
| 16 | + "name": "increment without arguments", |
| 17 | + "envelope": { |
| 18 | + "effectId": "fixture-effect-0002", |
| 19 | + "actorType": "transmit-counters", |
| 20 | + "actorId": "fixture-counter", |
| 21 | + "operation": "increment" |
| 22 | + }, |
| 23 | + "idempotencyKey": "transmit:fixture-effect-0002" |
| 24 | + } |
| 25 | + ], |
| 26 | + "duplicatePair": [ |
| 27 | + { |
| 28 | + "effectId": "fixture-effect-0003", |
| 29 | + "actorType": "transmit-counters", |
| 30 | + "actorId": "fixture-counter", |
| 31 | + "operation": "increment", |
| 32 | + "arguments": { "amount": 1 } |
| 33 | + }, |
| 34 | + { |
| 35 | + "effectId": "fixture-effect-0003", |
| 36 | + "actorType": "transmit-counters", |
| 37 | + "actorId": "fixture-counter", |
| 38 | + "operation": "increment", |
| 39 | + "arguments": { "amount": 1 } |
| 40 | + } |
| 41 | + ], |
| 42 | + "malformed": [ |
| 43 | + { |
| 44 | + "name": "missing effectId", |
| 45 | + "envelope": { |
| 46 | + "actorType": "transmit-counters", |
| 47 | + "actorId": "fixture-counter", |
| 48 | + "operation": "increment" |
| 49 | + } |
| 50 | + }, |
| 51 | + { |
| 52 | + "name": "empty actorId", |
| 53 | + "envelope": { |
| 54 | + "effectId": "fixture-effect-0004", |
| 55 | + "actorType": "transmit-counters", |
| 56 | + "actorId": "", |
| 57 | + "operation": "increment" |
| 58 | + } |
| 59 | + }, |
| 60 | + { |
| 61 | + "name": "snake_case keys", |
| 62 | + "envelope": { |
| 63 | + "effect_id": "fixture-effect-0005", |
| 64 | + "actor_type": "transmit-counters", |
| 65 | + "actor_id": "fixture-counter", |
| 66 | + "operation": "increment" |
| 67 | + } |
| 68 | + }, |
| 69 | + { |
| 70 | + "name": "non-string operation", |
| 71 | + "envelope": { |
| 72 | + "effectId": "fixture-effect-0006", |
| 73 | + "actorType": "transmit-counters", |
| 74 | + "actorId": "fixture-counter", |
| 75 | + "operation": 7 |
| 76 | + } |
| 77 | + }, |
| 78 | + { |
| 79 | + "name": "arguments not an object", |
| 80 | + "envelope": { |
| 81 | + "effectId": "fixture-effect-0007", |
| 82 | + "actorType": "transmit-counters", |
| 83 | + "actorId": "fixture-counter", |
| 84 | + "operation": "increment", |
| 85 | + "arguments": [ 1 ] |
| 86 | + } |
| 87 | + } |
| 88 | + ] |
| 89 | +} |
0 commit comments