Skip to content

Commit

Permalink
Initial tests for kinesis_stream (ansible-collections#42)
Browse files Browse the repository at this point in the history
* Initial tests for kinesis_stream

* Add exceptions for broken check_mode behaviour (idemmpotency)

* kinesis_stream requires shards to be defined, update the docs to match

* Add tests for tagging and retention period

* Yet more tests (and bugs)

* Disable Kinesis KMS tests - not supported in CI right now

* Apply minor changes from review

Co-authored-by: Jill R <[email protected]>

Co-authored-by: Jill R <[email protected]>
  • Loading branch information
tremble and jillr authored Oct 8, 2020
1 parent 19c3ebc commit 54e4a46
Show file tree
Hide file tree
Showing 6 changed files with 1,000 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/modules/kinesis_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
community.aws.kinesis_stream:
name: test-stream
state: present
shards: 1
encryption_state: enabled
encryption_type: KMS
key_id: alias/aws/kinesis
Expand All @@ -140,6 +141,7 @@
community.aws.kinesis_stream:
name: test-stream
state: present
shards: 1
encryption_state: disabled
encryption_type: KMS
key_id: alias/aws/kinesis
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/kinesis_stream/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cloud/aws
shippable/aws/group2
18 changes: 18 additions & 0 deletions tests/integration/targets/kinesis_stream/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
kinesis_stream_name: '{{ resource_prefix }}'

kms_cmk_alias_1: '{{ resource_prefix }}-1'
kms_cmk_alias_2: '{{ resource_prefix }}-2'

# A variety of camelCase and PascalCase to test things don't get re-cased
# underneath us
kinesis_stream_tags_1:
tag: value
AnExample: AValue
somethingElse: Another Value
Bleep: bloop
# Adds 2 values, Deletes 2 and keeps a value
kinesis_stream_tags_2:
tag: value
foo: Bar
Baz: quuX
3 changes: 3 additions & 0 deletions tests/integration/targets/kinesis_stream/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies:
- prepare_tests
- setup_ec2
Loading

0 comments on commit 54e4a46

Please sign in to comment.