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-maestrodev-1.18.0.20131209090811 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131206115947 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131205181604 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131127194823 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131126122111 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131125111730 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131125083406 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131123105121 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131122203507 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131121075022 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131118164830 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131115184302 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131114200144 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/rackspace/requests/auto_scale/group_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.18.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.17.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.16.0 tests/rackspace/requests/auto_scale/group_tests.rb