diff --git a/tests/rackspace/models/monitoring/alarms_tests.rb b/tests/rackspace/models/monitoring/alarms_tests.rb new file mode 100644 index 000000000..a17af2606 --- /dev/null +++ b/tests/rackspace/models/monitoring/alarms_tests.rb @@ -0,0 +1,24 @@ +Shindo.tests('Fog::Rackspace::Monitoring | alarms', ['rackspace','rackspace_monitoring']) do + service = Fog::Rackspace::Monitoring.new + + begin + @entity = service.entities.create :label => "fog_#{Time.now.to_i.to_s}" + @check = service.checks.create(CHECK_CREATE_OPTIONS.merge( + :label => "fog_#{Time.now.to_i.to_s}", + :entity => @entity) ) + np = "npTechnicalContactsEmail" + options = CHECK_CREATE_OPTIONS.merge( + :label => "fog_#{Time.now.to_i.to_s}", + :entity => @entity, + :entity_id => @entity.id, + :check => @check, + :check_id => @check.id, + :notification_plan_id => np + ) + collection = service.alarms(:entity => @entity) + collection_tests(collection, options, false) do + end + ensure + @entity.destroy if @entity + end +end diff --git a/tests/rackspace/models/monitoring/check_types_tests.rb b/tests/rackspace/models/monitoring/check_types_tests.rb new file mode 100644 index 000000000..a99e11fcb --- /dev/null +++ b/tests/rackspace/models/monitoring/check_types_tests.rb @@ -0,0 +1,13 @@ +Shindo.tests('Fog::Rackspace::Monitoring | check_types', ['rackspace','rackspace_monitoring']) do + service = Fog::Rackspace::Monitoring.new + + @check_types = service.check_types + + tests('#all').succeeds do + @check_types.all + end + tests('#new').succeeds do + @check_types.new + end + +end