mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
fill in pending specs
This commit is contained in:
parent
d94722e01a
commit
34294ad441
5 changed files with 49 additions and 33 deletions
|
@ -11,7 +11,7 @@ module Fog
|
|||
attribute :instance_id, 'instanceId'
|
||||
attribute :size
|
||||
attribute :snapshot_id, 'snapshotId'
|
||||
attribute :status, 'status'
|
||||
attribute :status
|
||||
attribute :volume_id, 'volumeId'
|
||||
|
||||
def initialize(attributes = {})
|
||||
|
|
|
@ -4,14 +4,16 @@ describe 'Fog::AWS::EC2::KeyPair' do
|
|||
|
||||
describe "#initialize" do
|
||||
|
||||
it "should remap attributes from parser" #do
|
||||
# address = Fog::AWS::EC2::KeyPair.new(
|
||||
# 'instanceId' => 'i-00000000',
|
||||
# 'publicIp' => '0.0.0.0'
|
||||
# )
|
||||
# address.instance_id.should == 'i-00000000'
|
||||
# address.public_ip.should == '0.0.0.0'
|
||||
# end
|
||||
it "should remap attributes from parser" do
|
||||
key_pair = Fog::AWS::EC2::KeyPair.new(
|
||||
'keyFingerprint' => 'fingerprint',
|
||||
'keyMaterial' => 'material',
|
||||
'keyName' => 'name'
|
||||
)
|
||||
key_pair.fingerprint.should == 'fingerprint'
|
||||
key_pair.material.should == 'material'
|
||||
key_pair.name.should == 'name'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -4,14 +4,18 @@ describe 'Fog::AWS::EC2::SecurityGroup' do
|
|||
|
||||
describe "#initialize" do
|
||||
|
||||
it "should remap attributes from parser" #do
|
||||
# address = Fog::AWS::EC2::SecurityGroup.new(
|
||||
# 'instanceId' => 'i-00000000',
|
||||
# 'publicIp' => '0.0.0.0'
|
||||
# )
|
||||
# address.instance_id.should == 'i-00000000'
|
||||
# address.public_ip.should == '0.0.0.0'
|
||||
# end
|
||||
it "should remap attributes from parser" do
|
||||
security_group = Fog::AWS::EC2::SecurityGroup.new(
|
||||
'groupDescription' => 'description',
|
||||
'groupName' => 'name',
|
||||
'ipPermissions' => 'permissions',
|
||||
'ownerId' => 'owner'
|
||||
)
|
||||
security_group.group_description.should == 'description'
|
||||
security_group.group_name.should == 'name'
|
||||
security_group.ip_permissions.should == 'permissions'
|
||||
security_group.owner_id.should == 'owner'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -4,14 +4,16 @@ describe 'Fog::AWS::EC2::Snapshots' do
|
|||
|
||||
describe "#initialize" do
|
||||
|
||||
it "should remap attributes from parser" # do
|
||||
# snapshot = Fog::AWS::EC2::Address.new(
|
||||
# 'instanceId' => 'i-00000000',
|
||||
# 'publicIp' => '0.0.0.0'
|
||||
# )
|
||||
# address.instance_id.should == 'i-00000000'
|
||||
# address.public_ip.should == '0.0.0.0'
|
||||
# end
|
||||
it "should remap attributes from parser" do
|
||||
snapshot = Fog::AWS::EC2::Snapshot.new(
|
||||
'snapshotId' => 'snap-00000000',
|
||||
'startTime' => 'now',
|
||||
'volumeId' => 'vol-00000000'
|
||||
)
|
||||
snapshot.snapshot_id.should == 'snap-00000000'
|
||||
snapshot.start_time.should == 'now'
|
||||
snapshot.volume_id.should == 'vol-00000000'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -4,14 +4,22 @@ describe 'Fog::AWS::EC2::Volume' do
|
|||
|
||||
describe "#initialize" do
|
||||
|
||||
it "should remap attributes from parser" # do
|
||||
# volume = Fog::AWS::EC2::Address.new(
|
||||
# 'instanceId' => 'i-00000000',
|
||||
# 'publicIp' => '0.0.0.0'
|
||||
# )
|
||||
# address.instance_id.should == 'i-00000000'
|
||||
# address.public_ip.should == '0.0.0.0'
|
||||
# end
|
||||
it "should remap attributes from parser" do
|
||||
volume = Fog::AWS::EC2::Volume.new(
|
||||
'attachmentTime' => 'now',
|
||||
'availabilityZone' => 'us-east-1a',
|
||||
'createTime' => 'recently',
|
||||
'instanceId' => 'i-00000000',
|
||||
'snapshotId' => 'snap-00000000',
|
||||
'volumeId' => 'vol-00000000'
|
||||
)
|
||||
volume.attachment_time.should == 'now'
|
||||
volume.availability_zone.should == 'us-east-1a'
|
||||
volume.create_time.should == 'recently'
|
||||
volume.instance_id.should == 'i-00000000'
|
||||
volume.snapshot_id.should == 'snap-00000000'
|
||||
volume.volume_id.should == 'vol-00000000'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue