REST JavaScript client#165
Conversation
|
Fixes #140 |
Current coverage is 87.24% (diff: 86.66%)@@ master #165 diff @@
==========================================
Files 36 37 +1
Lines 1379 1294 -85
Methods 0 0
Messages 0 0
Branches 130 120 -10
==========================================
- Hits 1174 1129 -45
+ Misses 166 126 -40
Partials 39 39
|
| from remoteappmanager.rest.resource import Resource | ||
| from remoteappmanager.docker.container import Container as DockerContainer | ||
| from remoteappmanager.utils import url_path_join | ||
| from remoteappmanager.netutils import wait_for_http_server_2xx |
There was a problem hiding this comment.
Could wait_for_http_server_2xx be placed in utils?
There was a problem hiding this comment.
I prefer it in a separate module that is aimed at network.
|
Note that in the HomeHandler on master, if 'wait_for_http_server_2xx' throws a Timeout error, an error message is displayed and the container is removed. It is no longer the case here, instead the start button "loads" forever and the started container is not removed. |
|
|
||
| @gen_test | ||
| def test_basic(self): | ||
| yield wait_for_http_server_2xx(self.get_url("/short"), timeout=2) |
There was a problem hiding this comment.
how to make sure the request would finish within 2 seconds?
There was a problem hiding this comment.
Never mind that, the computer has to be reaaaaally slow to not have completed the request.
|
There is a retrogression on the error handling (see above), but I think we can fix that on a separate PR, all within release 0.6.0? The rest looks good to merge to me |
|
@kitchoi No I fix it here. |
|
Ok, the reason why you are not seeing the error is because we are missing bootstrap. That produces an error in the javascript execution. In any case, I ported the server side error handling (so it behaves like the old code) but I also need to introduce the javascript error handling to remove the spinner. |
|
👍 |


Uses the REST interface to start and stop containers, removing the need for the POST method in HomeHandler.