You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Documentation can be found at [https://hexdocs.pm/ex_aws_dynamo](https://hexdocs
27
27
28
28
### DynamoDB Local
29
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)
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
31
32
32
## Configuration
33
33
@@ -52,11 +52,27 @@ This application supports three test commands:
52
52
53
53
### Integration tests (optional)
54
54
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.
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 both a running local instance of DynamoDB as well as a `config/ddb_local_test.exs` file (.gitignored) formatted like so:
56
56
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.
57
+
`config/ddb_local_test.exs`
58
58
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.
59
+
```elixir
60
+
useMix.Config
61
+
62
+
config :ex_aws,
63
+
debug_requests:false, # set to true to monitor the DDB requests
64
+
access_key_id:"abcd",
65
+
secret_access_key:"1234",
66
+
region:"us-east-1"
67
+
68
+
config :ex_aws, :dynamodb,
69
+
scheme:"http://",
70
+
host:"localhost",
71
+
port:SET_YOUR_PORT,
72
+
region:"us-east-1"
73
+
```
74
+
75
+
Before setting the `:port`, be aware that `test/lib/dynamo/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.
0 commit comments