> @@ -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);
Not that I can see at this point. You can't reliably know exactly what kind of
cloud you're running against. Trying to do so would lead to brittle spaghetti
code.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/355/files#r12066426