Sha256: c9862bae12bbdce290a006c514583002d1263862b6bd8120d1d2223be8956a4b

Contents?: true

Size: 1.55 KB

Versions: 39

Compression:

Stored size: 1.55 KB

Contents

Shindo.tests('Fog::Rackspace::AutoScale | group_tests', ['rackspace', 'rackspace_autoscale']) do
	
	pending if Fog.mocking? 
	service = Fog::Rackspace::AutoScale.new :rackspace_region => :ord
  
	tests('success') do
		tests('#create new group').formats(GROUP_FORMAT) do
			response = service.create_group(LAUNCH_CONFIG_OPTIONS, GROUP_CONFIG_OPTIONS, POLICIES_OPTIONS).body
      @group_id = response['group']['id']
			response
		end
		tests('#list_groups').formats(LIST_GROUPS_FORMAT) do
      service.list_groups.body
	  end
    tests('#get group').succeeds do
      [200, 204].include? service.get_group(@group_id).status
    end
    tests('#get group - body').formats(GROUP_FORMAT) do
      service.get_group(@group_id).body
    end
    tests('#get_group_state').formats(GROUP_STATE_FORMAT) do
      service.get_group_state(@group_id).body
    end
    tests('#pause_group_state') do
      pending
    end
    tests('#resume_group_state') do
      pending
    end
    tests('#delete group').returns(204) do
      service.delete_group(@group_id).status
    end
	end

	tests('failure') do
    tests('#fail to create group(-1)').raises(Fog::Rackspace::AutoScale::BadRequest) do
      service.create_group(@launch_config, @group_config, {})
    end
    tests('#fail to get group(-1)').raises(Fog::Rackspace::AutoScale::NotFound) do
      service.get_group(-1)
    end
    tests('#update group').raises(NoMethodError) do
      service.update_group
    end
    tests('#fail to delete group(-1)').raises(Fog::Rackspace::AutoScale::NotFound) do
      service.delete_group(-1)
    end
	end

end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
fog-1.22.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.21.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.20.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.19.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/rackspace/requests/auto_scale/group_tests.rb