Sha256: 370f3c1ecd1da0d0edb60b96c6dc54f87f1f45a88b6432d2403fc60bbb8e50b0

Contents?: true

Size: 1.56 KB

Versions: 124

Compression:

Stored size: 1.56 KB

Contents

Shindo.tests('Fog::Storage[:ibm] | volume', ['ibm']) do

  tests('success') do

    @volume       = nil
    @volume_id    = nil
    @name         = "fog test volume"
    @format       = "RAW"
    @location_id  = "41"
    @size         = "256"
    @offering_id  = "20001208"

    tests('Fog::Storage::IBM::Volume.new') do
      @volume = Fog::Storage[:ibm].volumes.new(
        :name           => @name,
        :format         => @format,
        :location_id    => @location_id,
        :size           => @size,
        :offering_id    => @offering_id
      )
      returns(@name) { @volume.name }
    end

    tests('Fog::Storage::IBM::Volume#save') do
      returns(true)   { @volume.save }
      returns(String) { @volume.id.class }
      @volume.wait_for(Fog::IBM.timeout) { ready? }
      @volume_id = @volume.id
    end

    tests("Fog::Storage::IBM::Volume#instance") do
      returns(nil) { @volume.instance }
    end

    tests("Fog::Storage::IBM::Volume#location_id") do
      returns(String) { @volume.location_id.class }
    end

    tests('Fog::Storage::IBM::Volume#id') do
      returns(@volume_id) { @volume.id }
    end

    tests('Fog::Storage::IBM::Volume#ready?') do
      # We do a "get" to advance the state if we are mocked.
      # TODO: Fix this for real connections
      Fog::Storage[:ibm].get_volume(@volume_id)
      returns(true) { @volume.ready? }
    end

    tests('Fog::Storage::IBM::Volume#state') do
      returns("Detached") { @volume.state }
    end

    tests('Fog::Storage::IBM::Volume#destroy') do
      returns(true) { @volume.destroy }
    end

  end

end

Version data entries

124 entries across 122 versions & 18 rubygems

Version Path
fog-maestrodev-1.18.0.20131219022322 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131209090811 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131206115947 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131205181604 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131127194823 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131126122111 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131125111730 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131125083406 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131123105121 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131122203507 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131121075022 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131118164830 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131115184302 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131114200144 tests/ibm/models/storage/volume_tests.rb
gapinc-fog-1.12.1.2.1 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/ibm/models/storage/volume_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/ibm/models/storage/volume_tests.rb