Sha256: 08f06bb70e01e0190f1de5275f78720714a55d2a736d997cfb4a36fe33e33646

Contents?: true

Size: 836 Bytes

Versions: 7

Compression:

Stored size: 836 Bytes

Contents

Shindo.tests('Slicehost#reboot_slice', 'slicehost') do
  tests('success') do

    before do
      @data = Slicehost[:slices].create_slice(1, 3, 'fogrebootslice').body
      @id = @data['id']
      Fog.wait_for { Slicehost[:slices].get_slice(@id).body['status'] == 'active' }
      @data = Slicehost[:slices].reboot_slice(@id).body
    end

    after do
      Fog.wait_for { Slicehost[:slices].get_slice(@id).body['status'] == 'active' }
      Slicehost[:slices].delete_slice(@id)
    end

    test('has proper output format') do
      validate_format(@data, Slicehost::Formats::SLICE)
    end

  end

  tests('failure') do

    test('raises Forbidden error if flavor does not exist') do
      begin
        Slicehost[:slices].reboot_slice(0)
        false
      rescue Excon::Errors::Forbidden
        true
      end
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.0.91 tests/slicehost/requests/reboot_slice_tests.rb
fog-0.0.90 tests/slicehost/requests/reboot_slice_tests.rb
fog-0.0.89 tests/slicehost/requests/reboot_slice_tests.rb
fog-0.0.88 tests/slicehost/requests/reboot_slice_tests.rb
fog-0.0.87 tests/slicehost/requests/reboot_slice_tests.rb
fog-0.0.86 tests/slicehost/requests/reboot_slice_tests.rb
fog-0.0.85 tests/slicehost/requests/reboot_slice_tests.rb