Sha256: 394a0418d37e49190bfaaeda1207b4eea9c6537a9013b94516dea41d24b1342b

Contents?: true

Size: 1.21 KB

Versions: 3

Compression:

Stored size: 1.21 KB

Contents

Shindo.tests('Voxel::Compute | image requests', ['voxel']) do

  @images_format = {
    'images' => [{
      'id'      => Integer,
      'summary' => String
    }],
    'stat' => String
  }

  @image_format = {
    'images' => [{
      'description'       => String,
      'id'                => Integer,
      'filesystem'        => {
        'size'  => Integer,
        'type'  => String,
        'units' => String,
      },
      'operating_system'  => {
        'admin_username'  => String,
        'architecture'    => Integer,
        'family'          => String,
        'product_family'  => String,
        'product_version' => String,
        'version'         => String
      },
      'summary'           => String
    }],
    'stat' => String
  }

  tests('success') do
    tests('#images_list').formats(@images_format) do
      pending if Fog.mocking?
      Voxel[:compute].images_list.body
    end

    tests('#images_list(1)').formats(@image_format) do
      pending if Fog.mocking?
      Voxel[:compute].images_list(1).body
    end
  end

  tests('failure') do
    tests('#images_list(0)').raises(Fog::Voxel::Compute::Error) do
      pending if Fog.mocking?
      Voxel[:compute].images_list(0).body
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-0.8.2 tests/compute/requests/voxel/image_tests.rb
fog-0.8.1 tests/compute/requests/voxel/image_tests.rb
fog-0.8.0 tests/compute/requests/voxel/image_tests.rb