Skip to content

Commit 6abbbd5

Browse files
committed
Sync protocol tests
1 parent d6cf67a commit 6abbbd5

File tree

10 files changed

+1184
-175
lines changed

10 files changed

+1184
-175
lines changed

test/fixtures/protocol/input/ec2.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,5 +356,59 @@
356356
}
357357
}
358358
]
359+
},
360+
{
361+
"description": "Idempotency token auto fill",
362+
"metadata": {
363+
"protocol": "ec2",
364+
"apiVersion": "2014-01-01"
365+
},
366+
"shapes": {
367+
"InputShape": {
368+
"type": "structure",
369+
"members": {
370+
"Token": {
371+
"shape": "StringType",
372+
"idempotencyToken": true
373+
}
374+
}
375+
},
376+
"StringType": {
377+
"type": "string"
378+
}
379+
},
380+
"cases": [
381+
{
382+
"given": {
383+
"input": {
384+
"shape": "InputShape"
385+
},
386+
"name": "OperationName"
387+
},
388+
"params": {
389+
"Token": "abc123"
390+
},
391+
"serialized": {
392+
"uri": "/",
393+
"headers": {},
394+
"body": "Action=OperationName&Version=2014-01-01&Token=abc123"
395+
}
396+
},
397+
{
398+
"given": {
399+
"input": {
400+
"shape": "InputShape"
401+
},
402+
"name": "OperationName"
403+
},
404+
"params": {
405+
},
406+
"serialized": {
407+
"uri": "/",
408+
"headers": {},
409+
"body": "Action=OperationName&Version=2014-01-01&Token=00000000-0000-4000-8000-000000000000"
410+
}
411+
}
412+
]
359413
}
360414
]

test/fixtures/protocol/input/json.json

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
"description": "Empty maps",
427427
"metadata": {
428428
"protocol": "json",
429-
"jsonVersion": 1.1,
429+
"jsonVersion": "1.1",
430430
"targetPrefix": "com.amazonaws.foo"
431431
},
432432
"shapes": {
@@ -475,5 +475,65 @@
475475
}
476476
}
477477
]
478+
},
479+
{
480+
"description": "Idempotency token auto fill",
481+
"metadata": {
482+
"protocol": "json",
483+
"apiVersion": "2014-01-01"
484+
},
485+
"shapes": {
486+
"InputShape": {
487+
"type": "structure",
488+
"members": {
489+
"Token": {
490+
"shape": "StringType",
491+
"idempotencyToken": true
492+
}
493+
}
494+
},
495+
"StringType": {
496+
"type": "string"
497+
}
498+
},
499+
"cases": [
500+
{
501+
"given": {
502+
"input": {
503+
"shape": "InputShape"
504+
},
505+
"http": {
506+
"method": "POST"
507+
},
508+
"name": "OperationName"
509+
},
510+
"params": {
511+
"Token": "abc123"
512+
},
513+
"serialized": {
514+
"uri": "/",
515+
"headers": {},
516+
"body": "{\"Token\": \"abc123\"}"
517+
}
518+
},
519+
{
520+
"given": {
521+
"input": {
522+
"shape": "InputShape"
523+
},
524+
"http": {
525+
"method": "POST"
526+
},
527+
"name": "OperationName"
528+
},
529+
"params": {
530+
},
531+
"serialized": {
532+
"uri": "/",
533+
"headers": {},
534+
"body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}"
535+
}
536+
}
537+
]
478538
}
479539
]

0 commit comments

Comments
 (0)