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