Sha256: c0e3c98330cf299b1d68e9d23ff3c85020c93ea5b103f5a80bc316c72bdcfbc5

Contents?: true

Size: 1.42 KB

Versions: 83

Compression:

Stored size: 1.42 KB

Contents

Shindo.tests('Fog::Metering[:openstack] | meter requests', ['openstack']) do

  @sample_format = {
    'counter_name'      => String,
    'user_id'           => String,
    'resource_id'       => String,
    'timestamp'         => String,
    'resource_metadata' => Hash,
    'source'            => String,
    'counter_unit'      => String,
    'counter_volume'    => Float,
    'project_id'        => String,
    'message_id'        => String,
    'counter_type'      => String
  }

  @meter_format = {
    'user_id'     => String,
    'name'        => String,
    'resource_id' => String,
    'project_id'  => String,
    'type'        => String,
    'unit'        => String
  }

  @statistics_format = {
    'count'          => Integer,
    'duration_start' => String,
    'min'            => Float,
    'max'            => Float,
    'duration_end'   => String,
    'period'         => Integer,
    'period_end'     => String,
    'duration'       => Float,
    'period_start'   => String,
    'avg'            => Float,
    'sum'            => Float
  }
  tests('success') do
    tests('#list_meters').formats([@meter_format]) do
      Fog::Metering[:openstack].list_meters.body
    end

    tests('#get_samples').formats([@sample_format]) do
      Fog::Metering[:openstack].get_samples('test').body
    end

    tests('#get_statistics').formats([@statistics_format]) do
      Fog::Metering[:openstack].get_statistics('test').body
    end
  end
end

Version data entries

83 entries across 83 versions & 7 rubygems

Version Path
fog-1.28.0 tests/openstack/requests/metering/meter_tests.rb
fog-1.27.0 tests/openstack/requests/metering/meter_tests.rb
fog-1.26.0 tests/openstack/requests/metering/meter_tests.rb
fog-1.25.0 tests/openstack/requests/metering/meter_tests.rb
nsidc-fog-1.24.1 tests/openstack/requests/metering/meter_tests.rb
fog-1.24.0 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.11 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.10 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.9 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.8 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.7 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.6 tests/openstack/requests/metering/meter_tests.rb
fog-1.23.0 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.4 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.3 tests/openstack/requests/metering/meter_tests.rb
ns-fog-1.22.2 tests/openstack/requests/metering/meter_tests.rb
fog-1.22.1 tests/openstack/requests/metering/meter_tests.rb
fog-1.22.0 tests/openstack/requests/metering/meter_tests.rb
fog-1.21.0 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/openstack/requests/metering/meter_tests.rb