Sha256: 45a397044ee8b9d3734c96acba45cd2d4f4c21dd430905b182667c5c333be969

Contents?: true

Size: 1.83 KB

Versions: 79

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

79 entries across 77 versions & 6 rubygems

Version Path
fog-aws-3.12.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.11.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.10.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.9.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.8.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.7.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.6.7 tests/models/beanstalk/application_tests.rb
fog-aws-3.6.6 tests/models/beanstalk/application_tests.rb
fog-aws-3.6.5 tests/models/beanstalk/application_tests.rb
fog-aws-3.6.4 tests/models/beanstalk/application_tests.rb
fog-aws-3.6.3 tests/models/beanstalk/application_tests.rb
fog-aws-3.6.2 tests/models/beanstalk/application_tests.rb
fog-aws-3.5.2 tests/models/beanstalk/application_tests.rb
fog-aws-3.5.1 tests/models/beanstalk/application_tests.rb
fog-aws-3.5.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.4.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.3.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.2.0 tests/models/beanstalk/application_tests.rb
fog-aws-3.1.0 tests/models/beanstalk/application_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/tests/models/beanstalk/application_tests.rb