We need tests for the MakeAPI, similar to how we are doing it for login. I want things tested per commit so we don't keep regressing. I'll start this and get sedge to finish it.
Sedge, I've gotten this to the point that I can hand it off to you to complete, see https://github.com/mozilla/MakeAPI/pull/67. Similar to the Login tests, my goal is maximal coverage of the code paths through the MakeAPI routes. Ideally, whenever we make changes, or check-in code, we'll know that we haven't broken anything in the API. I've CC'ed Chris and Matt, as they know more about the MakeAPI than I do, and can guide you as you write these tests. They are also probably the right people to do reviews, especially if I'm away when you get it done. A few notes about my code: * When the tests start they spin up a bunch of servers: the MakeAPI on port 3000; Webfaker on ports 3001, 3002, 3003. We only use the fake Login server on 3002 to simulate having a real login server available to us. You may find that the Webfaker stuff isn't sufficient for what you need, and we either need to a) update it; b) run a real login.webmaker.org server in the test environment. Either is fine. * In Webfaker I've made 2 accounts, one called admin and one called notadmin. They can be used when you need to create records as an admin or non-admin * Similar to how the login tests worked, I've created a unique() function which builds a unique make record. It takes an arg where you can pass options with specific data, if you need to specify how things get set. The code will show you how it works. Let me know if you have questions.
Haven't forgotten about this bad-boy, but duty has called. Repeatedly.
Comment on attachment 766904 [details] [review] https://github.com/igoryen/MakeAPI/pull/2 Keep hacking! Process point: It is a good idea to mark pull requests that you /don't/ want to be merged. I do this by prefixing the PR name with [WIP] (work in progress). Flag again when you have more for me to look at.
Comment on attachment 766904 [details] [review] https://github.com/igoryen/MakeAPI/pull/2 Done! Take a look at my comments.
Comment on attachment 766904 [details] [review] https://github.com/igoryen/MakeAPI/pull/2 https://github.com/igoryen/MakeAPI/pull/2
Comment on attachment 766904 [details] [review] https://github.com/igoryen/MakeAPI/pull/2 You're getting there! Keep posting these patches.
It's been so long - has this been done already?
The only tests that exist are for the DSL generation code.
I really wanna tackle this bug, but I have no idea when I'll get to it since I'm back in school. Would you be comfortable leaving it on me until I can do it? Otherwise I'll un-assign it.
Feel free to leave this assigned to yourself. If I find myself with the time to take this on, I'll know where to look.