mirror of https://github.com/apache/jclouds.git
Fixed InstanceApiLiveTest, made Instance.status @Nullable
This commit is contained in:
parent
aa3a8dff8a
commit
da9bd0c19d
|
@ -225,7 +225,7 @@ public abstract class Instance {
|
|||
|
||||
public abstract URI machineType();
|
||||
|
||||
public abstract Status status();
|
||||
@Nullable public abstract Status status();
|
||||
|
||||
/** Human-readable explanation of the status. */
|
||||
@Nullable public abstract String statusMessage();
|
||||
|
|
|
@ -126,9 +126,14 @@ public class InstanceApiLiveTest extends BaseGoogleComputeEngineApiLiveTest {
|
|||
|
||||
@Test(groups = "live", dependsOnMethods = "testInsertInstance")
|
||||
public void testAddAccessConfig() {
|
||||
Instance instance = api().get(INSTANCE_NAME);
|
||||
assertNotNull(instance);
|
||||
assertOperationDoneSuccessfully(api().deleteAccessConfigFromNic(INSTANCE_NAME,
|
||||
instance.networkInterfaces().get(0).accessConfigs().get(0).name(), "nic0"));
|
||||
|
||||
AccessConfig config = AccessConfig.create("test-config", Type.ONE_TO_ONE_NAT, null);
|
||||
assertOperationDoneSuccessfully(api().addAccessConfigToNic(INSTANCE_NAME, config, "nic0"));
|
||||
Instance instance = api().get(INSTANCE_NAME);
|
||||
instance = api().get(INSTANCE_NAME);
|
||||
assertNotNull(instance);
|
||||
assertEquals(instance.networkInterfaces().get(0).accessConfigs().get(0).name(), "test-config");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue