Sha256: 049f304aae904d3a9d441c4a9f587f9d34e3e483ceeac690885ae419f5e1b3e6

Contents?: true

Size: 1.33 KB

Versions: 27

Compression:

Stored size: 1.33 KB

Contents

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

class AwsTest < Test::Unit::TestCase

  context "aws" do

    setup do
      env = {'access_key' => "XXX", 'secret_access_key' => "YYY", 'region' => "us-east-1"}
      env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
      @cloud = Rubber::Cloud::Aws.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 "provide table store" do
      assert @cloud.table_store('somekey')
    end

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

  context "aws with alternative region" do
    
    setup do
      @region = "ap-southeast-2"
      env = {'access_key' => "XXX", 'secret_access_key' => "YYY", 'region' => @region}
      env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
      @cloud = Rubber::Cloud::Aws.new(env, nil)
    end

    should "set region on compute provider" do
      assert_equal @cloud.compute_provider.region, @region
    end

    should "set region on storage provider" do
      assert_equal @cloud.storage_provider.region, @region
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rubber-2.14.0 test/cloud/aws_test.rb
rubber-2.13.1 test/cloud/aws_test.rb
rubber-2.13.0 test/cloud/aws_test.rb
rubber-2.12.2 test/cloud/aws_test.rb
rubber-2.12.1 test/cloud/aws_test.rb
rubber-2.12.0 test/cloud/aws_test.rb
rubber-2.11.0 test/cloud/aws_test.rb
rubber-2.10.2 test/cloud/aws_test.rb
rubber-2.10.1 test/cloud/aws_test.rb
rubber-2.10.0 test/cloud/aws_test.rb
rubber-2.9.0 test/cloud/aws_test.rb
rubber-2.8.1 test/cloud/aws_test.rb
rubber-2.8.0 test/cloud/aws_test.rb
rubber-2.7.5 test/cloud/aws_test.rb
rubber-2.7.4 test/cloud/aws_test.rb
rubber-2.7.3 test/cloud/aws_test.rb
rubber-2.7.2 test/cloud/aws_test.rb
rubber-2.7.1 test/cloud/aws_test.rb
rubber-2.7.0 test/cloud/aws_test.rb
rubber-2.6.5 test/cloud/aws_test.rb