Permalink
Browse files

Merge branch 'hqapi-1.0' into hqapi-2.x

  • Loading branch information...
2 parents 4c66db5 + a0de5d4 commit 4f69e4194e97274b0e3361589e34e400ddae3647 Ryan Morgan committed Nov 24, 2009
Showing with 8 additions and 2 deletions.
  1. +1 −1 hqu/hqapi1/app/MetricController.groovy
  2. +7 −1 src/org/hyperic/hq/hqapi1/test/Metric_test.java
@@ -10,7 +10,7 @@ class MetricController extends ApiController {
interval : m.interval,
enabled : m.enabled,
name : m.template.name,
- defalutOn : m.template.defaultOn,
+ defaultOn : m.template.defaultOn,
indicator : m.template.designate,
collectionType : m.template.collectionType) {
MetricTemplate(id : m.template.id,
@@ -63,13 +63,19 @@ public void testListMetrics() throws Exception {
hqAssertSuccess(resp);
int numNotDefaultOn = 0;
+ int numDefaultOn = 0;
for (Metric m : resp.getMetric()) {
validateMetric(m);
if (!m.isDefaultOn()) {
numNotDefaultOn++;
+ } else {
+ numDefaultOn++;
}
}
- assertTrue("All metrics are defaultOn", numNotDefaultOn > 0);
+ assertTrue("All metrics are defaultOn, on = " + numDefaultOn +
+ " off = " + numNotDefaultOn, numNotDefaultOn > 0);
+ assertTrue("No metrics are not defaultOn, on = " + numDefaultOn +
+ " off = " + numNotDefaultOn, numDefaultOn > 0);
}
public void testListEnabledMetrics() throws Exception {

0 comments on commit 4f69e41

Please sign in to comment.