Sha256: 5afbe2a09157dc3bfec1b48047b22d902d0a0b89f9d8d680b0ae3216107ec6ce
Contents?: true
Size: 869 Bytes
Versions: 15
Compression:
Stored size: 869 Bytes
Contents
require File.dirname(__FILE__) + '/../../../spec_helper' describe 'EC2.get_console_output' do describe 'success' do before(:each) do @instance_id = ec2.run_instances('ami-5ee70037', 1, 1).body['instancesSet'].first['instanceId'] end after(:each) do ec2.terminate_instances([@instance_id]) end it "should return proper attributes" do actual = ec2.get_console_output(@instance_id) actual.body['instanceId'].should be_a(String) actual.body['output'].should be_a(String) actual.body['requestId'].should be_a(String) actual.body['timestamp'].should be_a(Time) end end describe 'failure' do it "should raise a BadRequest error if the instance does not exist" do lambda { ec2.get_console_output('i-00000000') }.should raise_error(Fog::Errors::BadRequest) end end end
Version data entries
15 entries across 15 versions & 1 rubygems