jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] JCLOUDS-569 : Storage for jobs is changed to list of maps (#67)
Date Mon, 02 Jun 2014 09:38:05 GMT
I've had a look at the existing tests, and I've just they're broken :( You were doing the right
thing, and spotted they are not properly configured.

If you look at all those expect tests that call the mocked API to get a **single result**,
you'll see that the mocked response that is returned contains a list of objects (WTF?). Those
tests are reusing the json responses used in the list methods, and that is wrong. And that's
why the null assertions are not enough.

In order to properly test your change, could you create a new json response file for your
test, say `drive-info.json` similar to the one in the [CloudSigma v2 API documentation](https://lvs.cloudsigma.com/docs/drives.html#list-single-drive),
and change the `testGetDriveInfo` test to use that file? Then you'll be able to properly assert
the returned fields.

And could you open a new JIRA issue to fix (doing the same thing) all the other Expect tests,
so all API calls that work with single objects, are returning single objects and not a list
of them (according to the API spec?).

Reply to this email directly or view it on GitHub:
View raw message