Skip to content

Commit b1efcf1

Browse files
committed
chore: Add support for dynamodb
1 parent 9cc20b1 commit b1efcf1

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

contract-tests/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ gem "redis", "~> 5.3"
1616
gem "connection_pool", "~> 2.4"
1717

1818
gem "diplomat", "~> 2.6"
19+
20+
gem "aws-sdk-dynamodb", "~> 1.127"

contract-tests/client_entity.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ def initialize(log, config)
5353
store_config[:url] = config[:persistentDataStore][:store][:url]
5454
store = LaunchDarkly::Integrations::Consul.new_feature_store(store_config)
5555
opts[:feature_store] = store
56+
when 'dynamodb'
57+
client = Aws::DynamoDB::Client.new(
58+
region: 'us-east-1',
59+
credentials: Aws::Credentials.new('dummy', 'dummy', 'dummy'),
60+
endpoint: config[:persistentDataStore][:store][:dsn]
61+
)
62+
store_config[:existing_client] = client
63+
store = LaunchDarkly::Integrations::DynamoDB.new_feature_store('sdk-contract-tests', store_config)
64+
opts[:feature_store] = store
5665
end
5766
end
5867

contract-tests/service.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
'evaluation-hooks',
4646
'omit-anonymous-contexts',
4747
'client-prereq-events',
48-
'persistent-data-store-redis',
4948
'persistent-data-store-consul',
49+
'persistent-data-store-dynamodb',
50+
'persistent-data-store-redis',
5051
],
5152
}.to_json
5253
end

0 commit comments

Comments
 (0)