2009-08-17 15:55:30 -07:00
|
|
|
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2009-07-10 19:28:45 -07:00
|
|
|
|
|
|
|
describe 'EC2.create_snapshot' do
|
|
|
|
|
2009-07-15 23:24:32 -07:00
|
|
|
before(:all) do
|
2009-08-17 22:39:44 -07:00
|
|
|
@volume_id = ec2.create_volume('us-east-1a', 1).body['volumeId']
|
2009-07-15 23:24:32 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
after(:all) do
|
2009-08-17 22:39:44 -07:00
|
|
|
ec2.delete_volume(@volume_id)
|
2009-07-19 16:06:33 -07:00
|
|
|
eventually do
|
2009-08-17 22:39:44 -07:00
|
|
|
ec2.delete_snapshot(@snapshot_id)
|
2009-07-19 16:06:33 -07:00
|
|
|
end
|
2009-07-15 23:24:32 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
it "should return proper attributes" do
|
2009-08-17 22:39:44 -07:00
|
|
|
actual = ec2.create_snapshot(@volume_id)
|
2009-08-01 01:15:44 -07:00
|
|
|
actual.body['progress'].should be_a(String)
|
|
|
|
@snapshot_id = actual.body['snapshotId']
|
|
|
|
actual.body['snapshotId'].should be_a(String)
|
|
|
|
actual.body['startTime'].should be_a(Time)
|
|
|
|
actual.body['status'].should be_a(String)
|
|
|
|
actual.body['volumeId'].should be_a(String)
|
2009-07-10 19:28:45 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|