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-maestrodev-1.18.0.20131127194823 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131126122111 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131125111730 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131125083406 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131123105121 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131122203507 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131121075022 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131118164830 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131115184302 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131114200144 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/openstack/requests/metering/meter_tests.rb
fog-1.18.0 tests/openstack/requests/metering/meter_tests.rb
fog-1.17.0 tests/openstack/requests/metering/meter_tests.rb
fog-1.16.0 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.15.0.20130927082724 tests/openstack/requests/metering/meter_tests.rb
fog-maestrodev-1.15.0.20130829165835 tests/openstack/requests/metering/meter_tests.rb
fog-1.15.0 tests/openstack/requests/metering/meter_tests.rb
gapinc-fog-1.14.0 tests/openstack/requests/metering/meter_tests.rb