Skip to content

Commit 462c133

Browse files
committed
Add local DDB version info to README, remove config/test.exs from .gitignore
1 parent 1f79a09 commit 462c133

File tree

4 files changed

+27
-40
lines changed

4 files changed

+27
-40
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@ erl_crash.dump
1818

1919
# Also ignore archive artifacts (built via "mix archive.build").
2020
*.ez
21-
22-
# Ignore config/test.exs to avoid unintentionally interfering with a user's local DDB instance. See README.
23-
config/test.exs

README.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ end
2323

2424
Documentation can be found at [https://hexdocs.pm/ex_aws_dynamo](https://hexdocs.pm/ex_aws_dynamo).
2525

26+
## Requirements
27+
28+
### DynamoDB Local
29+
30+
If you are running this module against a local version of DynamoDB, you'll want to make sure that you have installed the latest version, currently `1.11.477` (released 2019-02-06). You can find links to download the latest version [here](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html)
31+
2632
## Configuration
2733

2834
### `decode_sets`
@@ -46,30 +52,11 @@ This application supports three test commands:
4652

4753
### Integration tests (optional)
4854

49-
The tests in `test/lib/dynamo/integration_test.exs` will attempt to run against a running local instance of DynamoDB - in order to run these tests, you will need both a running local instance of DynamoDB as well as a `config/test.exs` file (currently .gitignored) formatted like so:
50-
51-
`config/test.exs`
52-
```elixir
53-
use Mix.Config
54-
55-
config :ex_aws,
56-
debug_requests: false,
57-
access_key_id: "abcd",
58-
secret_access_key: "1234",
59-
region: "us-east-1"
60-
61-
config :ex_aws, :dynamodb,
62-
scheme: "http://",
63-
host: "localhost",
64-
port: CHOOSE_YOUR_TEST_PORT,
65-
region: "us-east-1"
66-
```
67-
68-
(also available in `config/test.exs.example`)
55+
The tests in `test/lib/dynamo/integration_test.exs` will attempt to run against a local instance of DynamoDB - in order to run these tests, you will need a running local instance of DynamoDB and will need to uncomment the contents of `config/test.exs`, setting the value of `:port` to match Dynamo's port.
6956

70-
Before setting the `port`, be aware that `integration_test.exs` will create and delete tables with the names `"TestUsers"`, `"Test.User"`, `"TestSeveralUsers"`, `"TestFoo"`, `"test_books"`, `"TestUsersWithRange"`, `"TestTransactions"`, `"TestTransactions2"` - be careful when setting the port, as these operations may affect your current tables if they share any of those names.
57+
Before setting the `:port`, be aware that `integration_test.exs` will create and delete tables with the names `"TestUsers"`, `"Test.User"`, `"TestSeveralUsers"`, `"TestFoo"`, `"test_books"`, `"TestUsersWithRange"`, `"TestTransactions"`, `"TestTransactions2"` - be careful when setting the port, as these operations may affect your current tables if they share any of those names.
7158

72-
If you do not have a running local instance of DynamoDB and/or you don't provide a valid `config/test.exs` file, the integration tests will be ignored.
59+
If you do not have a running local instance of DynamoDB and/or you don't uncomment the contents of `config/test.exs`, the integration tests will be ignored.
7360

7461
## License
7562

config/test.exs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
use Mix.Config
2+
3+
###################################################################
4+
# Uncomment the configuration below and set the value for :port
5+
# in order to run the tests in test/lib/dynamo/integration_test.exs
6+
###################################################################
7+
8+
# config :ex_aws,
9+
# debug_requests: false, # set to true to monitor the DDB requests
10+
# access_key_id: "abcd",
11+
# secret_access_key: "1234",
12+
# region: "us-east-1"
13+
14+
# config :ex_aws, :dynamodb,
15+
# scheme: "http://",
16+
# host: "localhost",
17+
# port: SET_YOUR_TEST_PORT,
18+
# region: "us-east-1"

config/test.exs.example

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)