Sha256: 991b1ae8687a15a0893f758e97d9eee5b130128f9e48fb218f4834289b80fe27

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 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_raises(Fog::Errors::MockNotImplemented) { @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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubber-2.4.0 test/cloud/fog_test.rb