Sha256: 0a2ded809b34bedd140eb58f715831d0a59ed01bbd41f03456dc2bd0341338fb

Contents?: true

Size: 1.19 KB

Versions: 10

Compression:

Stored size: 1.19 KB

Contents

describe 'Kumogata::Client#show_resources' do
  it 'show resources' do

    resources = run_client(:show_resources, :arguments => ['MyStack']) do |client, cf|
      stack = make_double('stack') do |obj|
        expect(obj).to receive(:status) { 'CREATE_COMPLETE' }
        expect(obj).to receive(:resource_summaries).and_return([
          {
            :logical_resource_id    => 'myEC2Instance',
            :physical_resource_id   => 'i-XXXXXXXX',
            :resource_type          => 'AWS::EC2::Instance',
            :resource_status        => 'CREATE_COMPLETE',
            :resource_status_reason => nil,
            :last_updated_timestamp => '2014-03-03 04:04:40 UTC',
          }
        ])
      end

      stacks = make_double('stacks') do |obj|
        expect(obj).to receive(:[]).with('MyStack') { stack }
      end

      expect(cf).to receive(:stacks) { stacks }
    end

    expect(resources).to eq((<<-EOS).chomp)
[
  {
    "LogicalResourceId": "myEC2Instance",
    "PhysicalResourceId": "i-XXXXXXXX",
    "ResourceType": "AWS::EC2::Instance",
    "ResourceStatus": "CREATE_COMPLETE",
    "ResourceStatusReason": null,
    "LastUpdatedTimestamp": "2014-03-03 04:04:40 UTC"
  }
]
    EOS
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kumogata-0.5.12 spec/kumogata_show_resources_spec.rb
kumogata-0.5.11 spec/kumogata_show_resources_spec.rb
kumogata-0.5.10 spec/kumogata_show_resources_spec.rb
kumogata-0.5.9 spec/kumogata_show_resources_spec.rb
kumogata-0.5.8 spec/kumogata_show_resources_spec.rb
kumogata-0.5.7 spec/kumogata_show_resources_spec.rb
kumogata-0.5.6 spec/kumogata_show_resources_spec.rb
kumogata-0.5.5 spec/kumogata_show_resources_spec.rb
kumogata-0.5.4 spec/kumogata_show_resources_spec.rb
kumogata-0.5.3 spec/kumogata_show_resources_spec.rb