Permalink
Browse files

Fix testUpdateConfig() was not pulling resource configuration. Fix an…

…d add additional assertions.
  • Loading branch information...
Ryan Morgan
Ryan Morgan committed Apr 29, 2010
1 parent a94f905 commit 688c93eb905ef7b9a4680dd83d0640b9381384b4
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/org/hyperic/hq/hqapi1/test/ResourceUpdate_test.java
@@ -95,15 +95,21 @@ public void testUpdateConfig() throws Exception {
hqAssertSuccess(updateResponse);
ResourceResponse getResponse = api.getResource(createdResource.getId(),
- false, false);
+ true, false);
hqAssertSuccess(getResponse);
Resource updatedResource = getResponse.getResource();
+ assertTrue("No configuration found for " + updatedResource.getName(),
+ updatedResource.getResourceConfig().size() > 0);
+ boolean foundHostname = false;
for (ResourceConfig c : updatedResource.getResourceConfig()) {
if (c.getKey().equals("hostname")) {
assertEquals(c.getValue(), UPDATED_HOSTNAME);
+ foundHostname = true;
}
}
+ assertTrue("Unable to find hostname configuration for " + updatedResource.getName(),
+ foundHostname);
// Cannot delete resources soon after modifying them..
try {

0 comments on commit 688c93e

Please sign in to comment.