2013-09-27 14:27:36 -04:00
|
|
|
Shindo.tests('Fog::Rackspace::AutoScale | policies', ['rackspace', 'rackspace_autoscale']) do
|
2013-09-05 08:10:13 -04:00
|
|
|
pending if Fog.mocking?
|
|
|
|
service = Fog::Rackspace::AutoScale.new :rackspace_region => :ord
|
|
|
|
|
|
|
|
|
2013-09-16 05:34:07 -04:00
|
|
|
begin
|
2013-10-02 14:18:23 -04:00
|
|
|
group = service.groups.create({
|
|
|
|
:policies => POLICIES_OPTIONS,
|
|
|
|
:group_config => GROUP_CONFIG_OPTIONS,
|
|
|
|
:launch_config => LAUNCH_CONFIG_OPTIONS
|
|
|
|
})
|
|
|
|
|
|
|
|
options = {
|
|
|
|
:name => "policy 2",
|
|
|
|
:change => 5,
|
|
|
|
:cooldown => 100,
|
|
|
|
:type => 'webhook'
|
|
|
|
}
|
|
|
|
|
2013-09-16 05:34:07 -04:00
|
|
|
collection_tests(group.policies, options, false)
|
|
|
|
ensure
|
2013-10-02 14:18:23 -04:00
|
|
|
deactive_auto_scale_group(group)
|
|
|
|
group.destroy if group
|
2013-09-16 05:34:07 -04:00
|
|
|
end
|
2013-09-05 08:10:13 -04:00
|
|
|
end
|