View Git repositories
branches with status:
Name Status Last Modified Last Commit
lp:~jcastets/cloud-init/scaleway-unittests (Has a merge proposal) 1 Development 2015-10-27 17:38:07 UTC 2015-10-27
1155. Fix unittests, improve and test Scale...

Author: Julien Castets
Revision Date: 2015-10-27 17:38:07 UTC

Fix unittests, improve and test Scaleway datasource

On Scaleway, the API returns HTTP/404 if a server doesn't have user data.

readurl has been modified in r1150 to return None when the API returns
HTTP/404. It is wrong, since the other datasources consider 404 as an error
that need to retry.

To handle the 404 for Scaleway, this commit uses the argument exception_cb of
readurl, and restores the old behaviour of readurl to fix unitests.

Also, some unittests have been added (yeyy 100% coverage!) and the Scaleway
datasource is more resilient to errors (local port alerady used, HTTP call
being rate limited).

11 of 1 result