Sha256: 98a0e6238e808debd57d9478729375fa678d6fe827cc3558e9ded86ed3960da4

Contents?: true

Size: 1.12 KB

Versions: 10

Compression:

Stored size: 1.12 KB

Contents

require File.expand_path(File.join(__FILE__, '../..', 'test_helper'))
require 'rubber/cloud/aws'
require 'ostruct'

class FogTest < Test::Unit::TestCase

  context "fog" do

    setup do
      env = { 'compute_credentials' =>
                 { 'rackspace_api_key' => 'XXX', 'rackspace_username' => 'YYY', 'provider' => 'rackspace'},
             'storage_credentials' =>
                 { 'rackspace_api_key' => 'XXX', 'rackspace_username' => 'YYY', 'provider' => 'rackspace'}}
      env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
      @cloud = Rubber::Cloud::Fog.new(env, nil)
    end

    should "instantiate" do
      assert @cloud.compute_provider
      assert @cloud.storage_provider
    end

    should "provide storage" do
      assert @cloud.storage('mybucket')
    end

    should "not provide table store" do
      assert_raises { @cloud.table_store('somekey') }
    end

    should "create instance" do
      assert @cloud.create_instance('', '', '', '', '', '')
    end

    should "create instance with options" do
      assert @cloud.create_instance('', '', '', '', '', '', :foo => :bar)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubber-3.2.2 test/cloud/fog_test.rb
rubber-3.2.1 test/cloud/fog_test.rb
rubber-3.2.0 test/cloud/fog_test.rb
rubber-3.1.0 test/cloud/fog_test.rb
rubber-3.0.1 test/cloud/fog_test.rb
rubber-3.0.0 test/cloud/fog_test.rb
rubber-2.16.0 test/cloud/fog_test.rb
rubber-2.15.2 test/cloud/fog_test.rb
rubber-2.15.1 test/cloud/fog_test.rb
rubber-2.15.0 test/cloud/fog_test.rb