Closed ghost closed 8 years ago
Thanks! What would you think about breaking this up a little more so that you could potentially diff a local table against a real-life one?
I think that, instead of using a --local
flag, you could specify the table names like so:
diff-tables.js localhost:80/my-local-table us-east-1/my-remote-table
What do you think?
This is actually a great idea. Also a use case I will probably need. I'll work on that and keep this thread updated.
Finally been able to work on this (been away for a while, sorry for inconvenience). Is this issue still relevant ? Also, I get Travis CI fail because of env variables for AWS access/secret keys. Do you have any idea on how to solve this ?
Thanks a lot !
I think this would be a great addition! The travis failures from external contributions are a problem that I'm afraid I don't know the solution to. I should also do some work on the tests to allow a mocked S3 service or client.
In the meantime you should be able to:
pass tests/diff.test.js
locally if you run it like this:
AWS_ACCESS_KEY_ID=- AWS_SECRET_ACCESS_KEY=- node test/diff.test.js
/bin/diff-tables.js
, basically just need to make assertions that the CLI arguments are parsed correctly and passed to the diff()
function.Hi rclark, I've placed the function responsible for parsing location into a separate js file and I've added some test in the diff.test file.
To give you more background, I come from an automation and robotics background and this is the first time I actually write js code and I am not very unfamiliar with the best practices of js with testing and functions. (Too little time and so many technologies out there to research) I hope it's also compliant with your way of coding. Any suggestion is very welcome ! Looking forward to it.
Also, interesting fact, I am using your tool on AWS China (I am based in China at the moment) and it's working great for diff functionality. I'll be testing it more this week but so far it's working great. Good job on the tool, it will be very useful for us.
Thanks !
Allright, I made these little changes and made sure the tests we're passing in local. If anything else can let me know.
Cheers !
Thanks!
Hi, I've added the support for local dynamo using dynalite.
https://github.com/mhart/dynalite
I've simply added support for local IP address with port (i.e. 127.0.0.1:80). The command line option to use it is '--local'. This will pass the primary and replica values to Dyno by endpoint instead of region.
I've tested it multiple times with Dynalite and so far it works great.
Feel free to contact me for any additional info.
Thanks for this great tool.
Cheers