Sha256: 4cd9aa06678c80d5c1c7bf64987c5cd8347aa5f3a0940d2d3a0094eb0d260a33

Contents?: true

Size: 1.17 KB

Versions: 32

Compression:

Stored size: 1.17 KB

Contents

Shindo.tests("Fog::Rackspace::Storage | files", ['rackspace', 'storage']) do

  file_attributes = {
    :key => 'fog_files_tests',
    :body => lorem_file
  }

  directory_attributes = {
    :key => 'fogfilestests',
    :public => true
  }


  tests('success') do
    pending if Fog.mocking?
    collection_tests(Fog::Storage[:rackspace].directories.create(directory_attributes).files, file_attributes, false)

    @service = Fog::Storage.new :provider => 'rackspace', :rackspace_temp_url_key => "my_secret"

    @directory = @service.directories.create(directory_attributes)
    @file = @directory.files.create(file_attributes)

    tests("#get_url('#{@directory.key}')").succeeds do
      @directory.files.get_url(@directory.key)
    end

    tests("#get_http_url('#{@directory.key}')").succeeds do
      pending if Fog.mocking?
      expire_time = Time.now + 3600
      @directory.files.get_http_url(@file.key, expire_time)
    end

    tests("#get_https_url('#{@directory.key}', '#{@file.key}')").succeeds do
      pending if Fog.mocking?
      expire_time = Time.now + 3600
      @directory.files.get_https_url(@file.key, expire_time)
    end

    @file.destroy
    @directory.destroy
  end


end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
fog-maestrodev-1.19.0.20140212012611 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/rackspace/models/storage/files_tests.rb
fog-1.19.0 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131209090811 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131206115947 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131205181604 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131127194823 tests/rackspace/models/storage/files_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/rackspace/models/storage/files_tests.rb