Skip to content

Commit

Permalink
Merge pull request ansible-collections#725 from tremble/tests/dynamod…
Browse files Browse the repository at this point in the history
…b_table

Integration tests for dynamodb

SUMMARY
Integration tests for dynamodb
There's a lot of commented out tests, the current module's really inconsistent about return values and the "defaults" result in various settings being reset.  The current module also handles a number of temporary failures poorly (hence a lot of retry/until in the tests).
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
dynamodb
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
  • Loading branch information
ansible-zuul[bot] committed Sep 20, 2021
2 parents e125e89 + 002b237 commit 2defed0
Show file tree
Hide file tree
Showing 4 changed files with 783 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/integration/targets/dynamodb_table/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cloud/aws
47 changes: 47 additions & 0 deletions tests/integration/targets/dynamodb_table/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
table_name: '{{ resource_prefix }}'

table_index: 'id'
table_index_type: 'NUMBER'

range_index: 'variety'
range_index_type: 'STRING'

indexes:
- name: NamedIndex
type: global_include
hash_key_name: idx
range_key_name: create_time
includes:
- other_field
- other_field2
read_capacity: 10
write_capacity: 10
- name: AnotherIndex
type: global_all
hash_key_name: foo
range_key_name: bar
includes:
- another_field
- another_field2
read_capacity: 5
write_capacity: 5


tags_default:
snake_case_key: snake_case_value
camelCaseKey: camelCaseValue
PascalCaseKey: PascalCaseValue
'key with spaces': value with spaces
'Upper With Spaces': Upper With Spaces

partial_tags:
snake_case_key: snake_case_value
camelCaseKey: camelCaseValue

updated_tags:
updated_snake_case_key: updated_snake_case_value
updatedCamelCaseKey: updatedCamelCaseValue
UpdatedPascalCaseKey: UpdatedPascalCaseValue
'updated key with spaces': updated value with spaces
'updated Upper With Spaces': Updated Upper With Spaces
2 changes: 2 additions & 0 deletions tests/integration/targets/dynamodb_table/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dependencies:
- prepare_tests
Loading

0 comments on commit 2defed0

Please sign in to comment.