better error reporting

This commit is contained in:
Adrian Cole 2012-09-16 21:28:51 -07:00
parent 26016fde77
commit 8ca0dc3c1d
1 changed files with 4 additions and 4 deletions

View File

@ -348,8 +348,8 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte
// credentials aren't always the same
// assertEquals(node1.getCredentials(), node2.getCredentials());
assertLocationSameOrChild(node1.getLocation(), template.getLocation());
assertLocationSameOrChild(node2.getLocation(), template.getLocation());
assertLocationSameOrChild(checkNotNull(node1.getLocation(), "location of %s", node1), template.getLocation());
assertLocationSameOrChild(checkNotNull(node2.getLocation(), "location of %s", node2), template.getLocation());
checkImageIdMatchesTemplate(node1);
checkImageIdMatchesTemplate(node2);
checkOsMatchesTemplate(node1);
@ -411,7 +411,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte
if (existingLocationIsAssignable)
assertEquals(node.getLocation(), existingLocation);
else
this.assertLocationSameOrChild(node.getLocation(), template.getLocation());
this.assertLocationSameOrChild(checkNotNull(node.getLocation(), "location of %s", node), template.getLocation());
checkOsMatchesTemplate(node);
this.nodes.add(node);
}
@ -502,7 +502,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte
NodeMetadata metadata = client.getNodeMetadata(node.getId());
assertEquals(metadata.getProviderId(), node.getProviderId());
assertEquals(metadata.getGroup(), node.getGroup());
assertLocationSameOrChild(metadata.getLocation(), template.getLocation());
assertLocationSameOrChild(checkNotNull(metadata.getLocation(), "location of %s", metadata), template.getLocation());
checkImageIdMatchesTemplate(metadata);
checkOsMatchesTemplate(metadata);
assert (metadata.getStatus() == Status.RUNNING) : metadata;