Sha256: cb419dd0c3ad9dc71ee56148dfc90defc1d2fd9ba1f306792d39da6a6170ae93

Contents?: true

Size: 1.41 KB

Versions: 83

Compression:

Stored size: 1.41 KB

Contents

Shindo.tests("Fog::AWS[:beanstalk] | templates", ['aws', 'beanstalk']) do

  pending if Fog.mocking?

  @beanstalk = Fog::AWS[:beanstalk]

  @application_name = uniq_id('fog-test-app')
  @template_name = uniq_id('fog-test-template')

  @template_description = 'A nice description'

  @application = @beanstalk.applications.create({:name => @application_name})

  params = {
      :application_name => @application_name,
      :name => @template_name,
      :description => @template_description,
      :solution_stack_name => '32bit Amazon Linux running Tomcat 7'
  }

  collection = @beanstalk.templates

  tests('success') do

    tests("#new(#{params.inspect})").succeeds do
      pending if Fog.mocking?
      collection.new(params)
    end

    tests("#create(#{params.inspect})").succeeds do
      pending if Fog.mocking?
      @instance = collection.create(params)
    end

    tests("#all").succeeds do
      pending if Fog.mocking?
      collection.all
    end

    tests("#get(#{@application_name}, #{@template_name})").succeeds do
      pending if Fog.mocking?
      collection.get(@application_name, @template_name)
    end

    if !Fog.mocking?
      @instance.destroy
    end
  end

  tests('failure') do

    tests("#get(#{@application_name}, #{@template_name})").returns(nil) do
      pending if Fog.mocking?
      collection.get(@application_name, @template_name)
    end

  end

  # delete application
  @application.destroy

end

Version data entries

83 entries across 83 versions & 13 rubygems

Version Path
fog-maestrodev-1.18.0.20131209090811 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131206115947 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131205181604 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131127194823 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131126122111 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131125111730 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131125083406 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131123105121 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131122203507 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131121075022 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131118164830 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131115184302 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131114200144 tests/aws/models/beanstalk/templates_tests.rb
gapinc-fog-1.12.1.2.1 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/aws/models/beanstalk/templates_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/aws/models/beanstalk/templates_tests.rb
fog-1.18.0 tests/aws/models/beanstalk/templates_tests.rb
fog-1.17.0 tests/aws/models/beanstalk/templates_tests.rb
fog-1.16.0 tests/aws/models/beanstalk/templates_tests.rb