Sha256: 1a1c5e288adfbb646d7a4a6e2e63bb2f0a0a5cf73ed85830cc51e8124bcc9820
Contents?: true
Size: 1.38 KB
Versions: 2
Compression:
Stored size: 1.38 KB
Contents
require 'rubygems' require 'require_relative' if RUBY_VERSION < '1.9' require_relative 'common' describe 'MockDriver StorageSnapshots' do before do @driver = Deltacloud::new(:mock, :user => 'mockuser', :password => 'mockpassword') end it 'must throw error when wrong credentials' do Proc.new do @driver.backend.storage_snapshots(OpenStruct.new(:user => 'unknown', :password => 'wrong')) end.must_raise Deltacloud::Exceptions::AuthenticationFailure, 'Authentication Failure' end it 'must return list of storage_snapshots' do @driver.storage_snapshots.wont_be_empty @driver.storage_snapshots.first.must_be_kind_of Deltacloud::StorageSnapshot end it 'must allow to filter storage_snapshots' do @driver.storage_snapshots(:id => 'snap1').wont_be_empty @driver.storage_snapshots(:id => 'snap1').must_be_kind_of Array @driver.storage_snapshots(:id => 'snap1').size.must_equal 1 @driver.storage_snapshots(:id => 'snap1').first.id.must_equal 'snap1' @driver.storage_snapshots(:id => 'unknown').must_be_empty end it 'must allow to retrieve single storage_snapshot' do @driver.storage_snapshot(:id => 'snap1').wont_be_nil @driver.storage_snapshot(:id => 'snap1').must_be_kind_of Deltacloud::StorageSnapshot @driver.storage_snapshot(:id => 'snap1').id.must_equal 'snap1' @driver.storage_snapshot(:id => 'unknown').must_be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
deltacloud-core-1.1.3 | tests/drivers/mock/storage_snapshots_test.rb |
deltacloud-core-1.1.2 | tests/drivers/mock/storage_snapshots_test.rb |