-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
strip quotes from shard iterators before parsing base64 (#689)
* strip quotes from shard iterators before parsing base64 * Add CLI based test script * remove created stream after CLI tests --------- Co-authored-by: Eric Meisel <[email protected]>
- Loading branch information
1 parent
2a2dfc7
commit f3f86c6
Showing
4 changed files
with
91 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
aws --endpoint-url 'https://kinesis-mock:4567/' --no-verify-ssl kinesis list-streams | ||
|
||
KINESIS_STREAM_NAME=test-stream | ||
|
||
aws --endpoint-url 'https://kinesis-mock:4567/' --no-verify-ssl kinesis create-stream --stream-name $KINESIS_STREAM_NAME --shard-count 1 --stream-mode-details StreamMode=PROVISIONED | ||
|
||
base64_content=$(echo '{"test": "data"}' | base64) | ||
|
||
aws --endpoint-url 'https://kinesis-mock:4567/' --no-verify-ssl kinesis put-record \ | ||
--stream-name $KINESIS_STREAM_NAME \ | ||
--data ${base64_content} --partition-key id | ||
|
||
SHARD_ITERATOR=$(aws --endpoint-url 'https://kinesis-mock:4567/' --no-verify-ssl kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON --stream-name $KINESIS_STREAM_NAME --query 'ShardIterator'); | ||
|
||
aws --endpoint-url 'https://kinesis-mock:4567/' --no-verify-ssl kinesis get-records --shard-iterator $SHARD_ITERATOR | ||
|
||
aws --endpoint-url 'https://kinesis-mock:4567/' --no-verify-ssl kinesis delete-stream --stream-name $KINESIS_STREAM_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters