Sha256: ad9f4ed1e06707ac0a24f2479b111f7fa33150af56a4a248dca94aa3e8115ae2

Contents?: true

Size: 1.83 KB

Versions: 83

Compression:

Stored size: 1.83 KB

Contents

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

  pending if Fog.mocking?

  @application_opts = {
      :name => uniq_id('fog-test-app'),
      :description => 'A nice description.'
  }

  model_tests(Fog::AWS[:beanstalk].applications, @application_opts, false) do

    test("#attributes") do
      @instance.name == @application_opts[:name] &&
          @instance.description == @application_opts[:description]
    end

    test("#events") do
      # There should be some events now.
      @instance.events.length > 0
    end

    version_name = uniq_id('fog-test-ver')
    @instance.versions.create(
        :application_name => @instance.name,
        :label => version_name
    )

    test("#versions") do
      # We should have one version.
      @instance.versions.length == 1
    end

    template_name = uniq_id('fog-test-template')
    @instance.templates.create(
        :application_name => @instance.name,
        :name => template_name,
        :solution_stack_name => '32bit Amazon Linux running Tomcat 7'
    )

    test('#templates') do
      # We should have one template now.
      @instance.templates.length == 1
    end

    environment_name = uniq_id('fog-test-env')
    environment = @instance.environments.create(
        :application_name => @instance.name,
        :name => environment_name,
        :version_label => version_name,
        :solution_stack_name => '32bit Amazon Linux running Tomcat 7'
    )

    # Go ahead an terminate immediately.
    environment.destroy

    # Create an environment
    test("#environments") do
      # We should have one environment now.
      @instance.environments.length == 1
    end

    # Must wait for termination before destroying application
    tests("waiting for test environment to terminate").succeeds do
      environment.wait_for { terminated? }
    end

  end


end

Version data entries

83 entries across 83 versions & 13 rubygems

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