Bug #184
closedQuery 'state' doesn't work
Description
According to the web UI:
Out Of Sync Hosts 23
Hosts in Error State 4
Total hosts 204
(For the queries below, the web ui shows 198 hosts in 'base', 15 in 'memcached')
The query interface isn't reflecting that:
Memcached runs every 6 ours, so this test is ok:irb(main):049:0> gethosts( { 'class' => 'memcached' } ).length
NoMethodError: undefined method `length' for nil:NilClass
from (irb):49
from :0
This test is not though, should list 15 hosts:irb(main):050:0> gethosts( { 'class' => 'memcached', 'state' => 'all' } ).length
NoMethodError: undefined method `length' for nil:NilClass
from (irb):50
from :0
Should list 175 hosts:irb(main):052:0> gethosts( { 'class' => 'base' } ).length
=> 175
Should list 198 hosts:irb(main):051:0> gethosts( { 'class' => 'base', 'state' => 'all' } ).length
=> 175
Should list 204 hosts:irb(main):053:0> gethosts( { 'state' => 'all' } ).length
NoMethodError: undefined method `length' for nil:NilClass
from (irb):53
from :0