Sha256: e12b0172b54d798b303e7955f88726e4995772167295d222af989915700606db

Contents?: true

Size: 1.22 KB

Versions: 15

Compression:

Stored size: 1.22 KB

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'

describe Hugo::Aws::Rds do
  before(:each) do
    mock_ec2
    mock_elb
    mock_rds
  end
    
  it "should create a new instance" do    
    @hugo_rds = Hugo::Aws::Rds.new(:name => "myserver", :db => "mydb", :user => "user", :password => "password").should be_true
    @hugo_rds.save.should be_true
  end
  
  it "should return all" do
    Hugo::Aws::Rds.all.length.should == 1
  end
  # 
  it "should find rds instance" do        
    Hugo::Aws::Rds.find('test').should_not be_nil
  end
  
  it "should delete rds instance" do    
    Hugo::Aws::Rds.find('test').destroy
  end
  
  it "should provide uri" do
    Hugo::Aws::Rds.find('test').uri.should_not be_nil
  end

  it "should find or create db security group" do
    @rds = Hugo::Aws::Rds.find('i-12345678')
    @rds.find_or_create_db_security_group('test', 'test description').should_not be_empty
  end
  
  it "should destroy a db security group" do
    Hugo::Aws::Rds.find('i-12345678').destroy_db_security_group('test').should be_true
  end
  
  it "should authorize a ec2 security group" do
    @rds = Hugo::Aws::Rds.find('i-12345678')
    @rds.authorize_security_group('test', 'test', '12334').should_not be_empty
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hugo-0.3.5 spec/lib/hugo/aws/rds_spec.rb
hugo-0.3.4 spec/lib/hugo/aws/rds_spec.rb
hugo-0.3.2 spec/lib/hugo/aws/rds_spec.rb
hugo-0.3.1 spec/lib/hugo/aws/rds_spec.rb
hugo-0.3.0 spec/lib/hugo/aws/rds_spec.rb
hugo-0.2.0 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.11 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.10 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.9 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.6 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.5 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.4 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.2 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.1 spec/lib/hugo/aws/rds_spec.rb
hugo-0.1.0 spec/lib/hugo/aws/rds_spec.rb