> On Sept. 18, 2014, 9:53 p.m., Joshua Cohen wrote:
> > I don't love the idea of shipping a mock alongside production code.
> > 
> > Is there any way we can separate this out so that it's not included for 
> > prod (i.e. pull it out of services.js and into a file that's only included 
> > when running in dev mode)? Alternately, how would you feel about setting up 
> > a simple mock server that can serve up canned responses (would be easy to 
> > swap out responses by replacing the mock data on disk...).

We could definitely have a separate external test server and then wire in 
generic code to control the HTTP target (would also let us test against remote 
schedulers from a local client), it's just a question of where the code for 
that server and mocks lives.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25794/#review53879
-----------------------------------------------------------


On Sept. 18, 2014, 9:38 p.m., David McLaughlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25794/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2014, 9:38 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen, Kevin Sweeney, Maxim Khutornenko, 
> and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a mock scheduler client to the AuroraClient service.
> 
> There is probably a more Angular way to get this done which involves creating 
> a mock service, but this seemed like the simplest approach.
> 
> Interested in whether this is the right place to do mocking (or should it 
> come from the server so that we have more coverage of the client code?) or if 
> we should mock at all. 
> 
> Code itself needs cleaned up - I just want to solicit feedback before I go 
> too far down a bad path. 
> 
> 
> Diffs
> -----
> 
>   src/main/resources/org/apache/aurora/scheduler/http/ui/js/services.js 
> 8a719f85b0a095a93b723c04b0a5e8306093c572 
> 
> Diff: https://reviews.apache.org/r/25794/diff/
> 
> 
> Testing
> -------
> 
> In Chrome -> Developer Console:
> 
> window.__mockAPI__ = true;
> 
> Now I have updates in the UI. 
> 
> 
> Thanks,
> 
> David McLaughlin
> 
>

Reply via email to