Permalink
Browse files
Fix testUpdateConfig() was not pulling resource configuration. Fix an…
…d add additional assertions.
- Loading branch information...
Showing
with
7 additions
and
1 deletion.
-
+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