Sha256: bf6902e90a5dc00cb5232f1908cd52b9912c785bbaee7ffeea9db60990f71a83

Contents?: true

Size: 1.08 KB

Versions: 14

Compression:

Stored size: 1.08 KB

Contents

Shindo.tests("Fog::Compute[:google] | disk_type requests", ["google"]) do
  @google = Fog::Compute[:google]

  @get_disk_type_format = {
    "name" => String,
    "kind" => String,
    "id" => Fog::Nullable::String,
    "creationTimestamp" => String,
    "deprecated" => Fog::Nullable::Array,
    "description" => String,
    "selfLink" => String,
    "validDiskSize" => String,
    "zone" => String
  }

  @list_disk_types_format = {
    "kind" => String,
    "selfLink" => String,
    "items" => [@get_disk_type_format]
  }

  @list_aggregated_disk_types = {
    "kind" => String,
    "selfLink" => String,
    "items" => Hash
  }

  tests("success") do
    tests('#list_aggregated_disk_types').formats(@list_aggregated_disk_types) do
      @google.list_aggregated_disk_types.body
    end

    tests('#list_disk_types').formats(@list_disk_types_format) do
      @google.list_disk_types("us-central1-a").body
    end

    tests('#get_disk_type').formats(@get_disk_type_format) do
      disk_type = @google.disk_types.first
      @google.get_disk_type(disk_type.identity, disk_type.zone).body
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 tests/requests/compute/disk_type_tests.rb
fog-google-0.5.5 tests/requests/compute/disk_type_tests.rb
fog-google-0.5.4 tests/requests/compute/disk_type_tests.rb
fog-google-0.5.3 tests/requests/compute/disk_type_tests.rb
fog-google-0.5.2 tests/requests/compute/disk_type_tests.rb
fog-google-0.5.1 tests/requests/compute/disk_type_tests.rb
fog-google-0.5.0 tests/requests/compute/disk_type_tests.rb
fog-google-0.4.2 tests/requests/compute/disk_type_tests.rb
fog-google-0.4.1 tests/requests/compute/disk_type_tests.rb
fog-google-0.4.0 tests/requests/compute/disk_type_tests.rb
fog-google-0.3.2 tests/requests/compute/disk_type_tests.rb
fog-google-0.3.1 tests/requests/compute/disk_type_tests.rb
fog-google-0.3.0 tests/requests/compute/disk_type_tests.rb
fog-google-0.2.0 tests/requests/compute/disk_type_tests.rb