Permalink
Browse files

[HHQ-3565] Fix misspelled attribute causing all metrics to show defau…

…ltOn=false.
  • Loading branch information...
1 parent b950ccb commit a0de5d4e285d8940bc5f84b9a3063f2e27535880 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
View
2 hqu/hqapi1/app/MetricController.groovy
@@ -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,
View
8 src/org/hyperic/hq/hqapi1/test/Metric_test.java
@@ -36,13 +36,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 a0de5d4

Please sign in to comment.