Sha256: 994f5a2e1a19f3fa8a9568a6f3f5a22736ea43a5fb6a3f071c9362b47613f4dc

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 37 versions & 6 rubygems

Version Path
fog-rackspace-0.1.6 tests/rackspace/requests/auto_scale/group_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/auto_scale/group_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/auto_scale/group_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/auto_scale/group_tests.rb
fog-rackspace-0.1.5 tests/rackspace/requests/auto_scale/group_tests.rb
fog-rackspace-0.1.4 tests/rackspace/requests/auto_scale/group_tests.rb
fog-rackspace-0.1.3 tests/rackspace/requests/auto_scale/group_tests.rb
fog-rackspace-0.1.2 tests/rackspace/requests/auto_scale/group_tests.rb
fog-rackspace-0.1.1 tests/rackspace/requests/auto_scale/group_tests.rb
fog-rackspace-0.1.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.37.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.36.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.35.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-2.0.0.pre.0 tests/rackspace/requests/auto_scale/group_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.34.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.33.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.32.0 tests/rackspace/requests/auto_scale/group_tests.rb
fog-1.31.0 tests/rackspace/requests/auto_scale/group_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/rackspace/requests/auto_scale/group_tests.rb