spec/lib/rikanjo_rds_spec.rb in aws-rikanjo-0.0.8 vs spec/lib/rikanjo_rds_spec.rb in aws-rikanjo-0.0.9
- old
+ new
@@ -1,46 +1,56 @@
require "spec_helper"
-require "aws/rikanjo/mode/rds"
+require "aws/rikanjo/rds"
include RikanjoSpecHelper
-describe 'AWS::Rikanjo::Mode::Rds' do
+describe 'AWS::Rikanjo::Rds' do
describe 'url' do
+ it "build previous price url" do
+ a = Aws::RiKanjoo::Rds.new(
+ region = 'ap-northeast-1',
+ instance_type = 'm1.large',
+ ri_util = 'light',
+ multiaz = false,
+ )
+ expect(a.price_url).to eq "http://a0.awsstatic.com/pricing/1/rds/mysql/previous-generation"
+ end
+
it "build current price url" do
- a = Aws::RiKanjoo::Mode::Rds.new(
+ a = Aws::RiKanjoo::Rds.new(
region = 'ap-northeast-1',
instance_type = 'm3.large',
ri_util = 'light',
multiaz = false,
)
- expect(a.price_url).to eq "https://a0.awsstatic.com/pricing/1/rds/mysql"
+ expect(a.price_url).to eq "http://a0.awsstatic.com/pricing/1/rds/mysql"
end
it "build current om price file" do
- a = Aws::RiKanjoo::Mode::Rds.new(
+ a = Aws::RiKanjoo::Rds.new(
region = 'ap-northeast-1',
instance_type = 'm2.xlarge',
ri_util = 'medium',
multiaz = false,
)
expect(a.om_price_file).to eq "pricing-standard-deployments.min.js"
end
it "build current om price file(multiaz)" do
- a = Aws::RiKanjoo::Mode::Rds.new(
+ a = Aws::RiKanjoo::Rds.new(
region = 'ap-northeast-1',
instance_type = 'm2.xlarge',
ri_util = 'medium',
multiaz = true,
)
expect(a.om_price_file).to eq "pricing-multiAZ-deployments.min.js"
end
it "build current ri price file" do
- a = Aws::RiKanjoo::Mode::Rds.new(
+ a = Aws::RiKanjoo::Rds.new(
region = 'ap-northeast-1',
instance_type = 'm2.xlarge',
ri_util = 'medium',
multiaz = true,
)
@@ -52,18 +62,18 @@
describe 'contents validation' do
before :all do
# rikanjo (single-az)
- a1 = Aws::RiKanjoo::Mode::Rds.new(
+ a1 = Aws::RiKanjoo::Rds.new(
region = 'ap-northeast-1',
instance_type = 'm3.medium',
ri_util = 'medium',
multiaz = false,
)
# rikanjo (multi-az)
- a2 = Aws::RiKanjoo::Mode::Rds.new(
+ a2 = Aws::RiKanjoo::Rds.new(
region = 'ap-northeast-1',
instance_type = 'm3.medium',
ri_util = 'medium',
multiaz = true,
)
@@ -72,11 +82,11 @@
@c_om_multiaz_price = get_sleep("#{a2.price_url}/#{a2.om_price_file}")
end
it "is able to get the price(singleaz)" do
regions.each do |region|
- a = Aws::RiKanjoo::Mode::Rds.new(
+ a = Aws::RiKanjoo::Rds.new(
region = region,
instance_type = 'm3.large',
ri_util = 'medium',
multiaz = false,
)
@@ -91,11 +101,11 @@
end
end
it "is able to get the price(multiaz)" do
regions.each do |region|
- a = Aws::RiKanjoo::Mode::Rds.new(
+ a = Aws::RiKanjoo::Rds.new(
region = region,
instance_type = 'm3.large',
ri_util = 'medium',
multiaz = true,
)
@@ -110,10 +120,10 @@
end
end
it "an exception is raised when there are no instance-type" do
regions.each do |region|
- a = Aws::RiKanjoo::Mode::Rds.new(
+ a = Aws::RiKanjoo::Rds.new(
region = region,
instance_type = 'm3.large.not.exists',
ri_util = 'medium',
multiaz = false,
)