> @@ -131,9 +135,12 @@ public void testCreateInWrongAvailabilityZone() {
> for (String zoneId : zones) {
> ServerApi serverApi = api.getServerApiForZone(zoneId);
> try {
> - serverId = createServer(zoneId, "err",
> Server.Status.ERROR).getId();
> - Server server = serverApi.get(serverId);
> - assertEquals(server.getStatus(), Server.Status.ERROR);
> + serverId = createServer(zoneId, "err").getId();
> + } catch (HttpResponseException e) {
> + // Here is an implementation detail difference between OpenStack
> and some providers.
> + // Some providers accept a bad availability zone and create the
> server in the zoneId.
> + // Vanilla OpenStack will error out with a 400 Bad Request
> + assertEquals(e.getResponse().getStatusCode(), 400);
Is there some way we can split this out into two tests,
`vanillaOpenStackFailsInWrongAvailZone` and
`someProvidersDoWeirdStuffInWrongAvailZone` or so? Or is there no feasible way
to check at the beginning of the test which case to expect here?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/355/files#r12030520