diff options
Diffstat (limited to 'nova-model/src/test/java')
-rw-r--r-- | nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java | 9 | ||||
-rw-r--r-- | nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java index 87789ff..ecbd526 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java @@ -117,9 +117,8 @@ public class ServerTest { + " \"href\" : \"href\"," + EOL + " \"type\" : \"type\"" + EOL + " }, {" + EOL + " \"rel\" : \"rel\"," + EOL + " \"href\" : \"href\"," + EOL + " \"type\" : \"type\"" + EOL + " } ]," + EOL + " \"tenant_id\" : \"tenantid\"" + EOL + " } ]," + EOL - + " \"OS-EXT-STS:task_state\" : \"taskstate\"," + EOL - + " \"OS-EXT-STS:power_state\" : \"powerstate\"," + EOL + " \"OS-EXT-STS:vm_state\" : \"vmstate\"," - + EOL + " \"OS-EXT-SRV-ATTR:host\" : \"host\"," + EOL + + " \"OS-EXT-STS:task_state\" : \"taskstate\"," + EOL + " \"OS-EXT-STS:power_state\" : 1," + EOL + + " \"OS-EXT-STS:vm_state\" : \"vmstate\"," + EOL + " \"OS-EXT-SRV-ATTR:host\" : \"host\"," + EOL + " \"OS-EXT-SRV-ATTR:instance_name\" : \"instancename\"," + EOL + " \"OS-EXT-SRV-ATTR:hypervisor_hostname\" : \"hypervisorhostname\"," + EOL + " \"OS-DCF:diskConfig\" : \"diskconfig\"," + EOL @@ -172,8 +171,8 @@ public class ServerTest { String taskState = server.getTaskState(); Assert.assertNotNull(taskState); - String powerState = server.getPowerState(); - Assert.assertNotNull(powerState); + int powerState = server.getPowerState(); + Assert.assertEquals(1, powerState); String vmState = server.getVmState(); Assert.assertNotNull(vmState); diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java index 0cee90c..5be1aab 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java @@ -248,7 +248,7 @@ public class ServersTest { sb.append(" \"tenant_id\" : \"tenantid\"" + EOL); sb.append(" } ]," + EOL); sb.append(" \"OS-EXT-STS:task_state\" : \"taskstate\"," + EOL); - sb.append(" \"OS-EXT-STS:power_state\" : \"powerstate\"," + EOL); + sb.append(" \"OS-EXT-STS:power_state\" : 1," + EOL); sb.append(" \"OS-EXT-STS:vm_state\" : \"vmstate\"," + EOL); sb.append(" \"OS-EXT-SRV-ATTR:host\" : \"host\"," + EOL); sb.append(" \"OS-EXT-SRV-ATTR:instance_name\" : \"instancename\"," + EOL); @@ -467,7 +467,7 @@ public class ServersTest { sb.append(" \"tenant_id\" : \"tenantid\"" + EOL); sb.append(" } ]," + EOL); sb.append(" \"OS-EXT-STS:task_state\" : \"taskstate\"," + EOL); - sb.append(" \"OS-EXT-STS:power_state\" : \"powerstate\"," + EOL); + sb.append(" \"OS-EXT-STS:power_state\" : 1," + EOL); sb.append(" \"OS-EXT-STS:vm_state\" : \"vmstate\"," + EOL); sb.append(" \"OS-EXT-SRV-ATTR:host\" : \"host\"," + EOL); sb.append(" \"OS-EXT-SRV-ATTR:instance_name\" : \"instancename\"," + EOL); |