Path: blob/develop/tests/functional/elasticbeanstalk/test_update_configuration_template.py
1567 views
#!/usr/bin/env python1# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.2#3# Licensed under the Apache License, Version 2.0 (the "License"). You4# may not use this file except in compliance with the License. A copy of5# the License is located at6#7# http://aws.amazon.com/apache2.0/8#9# or in the "license" file accompanying this file. This file is10# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF11# ANY KIND, either express or implied. See the License for the specific12# language governing permissions and limitations under the License.13from awscli.testutils import BaseAWSCommandParamsTest14import os151617class TestUpdateConfigurationTemplate(BaseAWSCommandParamsTest):1819prefix = 'elasticbeanstalk update-configuration-template'2021def test_file(self):22data_path = os.path.join(os.path.dirname(__file__),23'new_keypair_config.json')24cmdline = self.prefix25cmdline += ' --application-name FooBar'26cmdline += ' --template-name x86_64_m1_medium_config'27cmdline += ' --option-settings file://%s' % data_path28cmdline += ' --description This_is_a_test'29result = {30'ApplicationName': 'FooBar',31'TemplateName': 'x86_64_m1_medium_config',32'Description': 'This_is_a_test',33'OptionSettings': [34{'Namespace': 'aws:autoscaling:launchconfiguration',35'OptionName': 'EC2KeyName',36'Value': 'webapps'},37{'Namespace': 'aws:elasticbeanstalk:container:tomcat:jvmoptions',38'OptionName': 'Xms',39'Value': '1256m'}]}40self.assert_params_for_cmd(cmdline, result)414243