1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00
fog--fog-aws/tests/models/beanstalk/environments_tests.rb
Josh Lane d48d376e9c initial import
* take the liberty of correcting Aws naming
2014-12-31 09:17:51 -08:00

34 lines
1 KiB
Ruby

Shindo.tests("Fog::AWS[:beanstalk] | environments", ['aws', 'beanstalk']) do
pending if Fog.mocking?
@beanstalk = Fog::AWS[:beanstalk]
@application_name = uniq_id('fog-test-app')
@environment_name = uniq_id('fog-test-env')
@version_name = uniq_id('fog-test-version')
# Create an application/version to use for testing.
@version = @beanstalk.versions.create({
:label => @version_name,
:application_name => @application_name,
:auto_create_application => true
})
@application = @beanstalk.applications.get(@application_name)
@environment_opts = {
:application_name => @application_name,
:name => @environment_name,
:version_label => @version_name,
:solution_stack_name => '32bit Amazon Linux running Tomcat 7'
}
collection_tests(@beanstalk.environments, @environment_opts, false)
# Wait for instance to terminate before deleting application
@instance.wait_for { terminated? }
# delete application
@application.destroy
end