Fixes potentially deleting a null server id.

This commit is contained in:
Zack Shoylev 2014-03-21 13:47:45 -05:00
parent 22a8b9d04c
commit 7588d2fba4
1 changed files with 9 additions and 3 deletions

View File

@ -88,7 +88,9 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
Server server = serverApi.get(serverId);
assertEquals(server.getStatus(), Server.Status.ACTIVE);
} finally {
serverApi.delete(serverId);
if (serverId!=null) {
serverApi.delete(serverId);
}
}
}
}
@ -133,7 +135,9 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
Server server = serverApi.get(serverId);
assertEquals(server.getStatus(), Server.Status.ERROR);
} finally {
serverApi.delete(serverId);
if (serverId!=null) {
serverApi.delete(serverId);
}
}
}
}
@ -168,7 +172,9 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
assertEquals("fe80::100", rebuiltServer.getAccessIPv6());
} finally {
serverApi.delete(serverId);
if (serverId!=null) {
serverApi.delete(serverId);
}
}
}
}