Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aws
GitHub Repository: aws/aws-cli
Path: blob/develop/tests/functional/elasticbeanstalk/test_update_configuration_template.py
1567 views
1
#!/usr/bin/env python
2
# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License"). You
5
# may not use this file except in compliance with the License. A copy of
6
# the License is located at
7
#
8
# http://aws.amazon.com/apache2.0/
9
#
10
# or in the "license" file accompanying this file. This file is
11
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
# ANY KIND, either express or implied. See the License for the specific
13
# language governing permissions and limitations under the License.
14
from awscli.testutils import BaseAWSCommandParamsTest
15
import os
16
17
18
class TestUpdateConfigurationTemplate(BaseAWSCommandParamsTest):
19
20
prefix = 'elasticbeanstalk update-configuration-template'
21
22
def test_file(self):
23
data_path = os.path.join(os.path.dirname(__file__),
24
'new_keypair_config.json')
25
cmdline = self.prefix
26
cmdline += ' --application-name FooBar'
27
cmdline += ' --template-name x86_64_m1_medium_config'
28
cmdline += ' --option-settings file://%s' % data_path
29
cmdline += ' --description This_is_a_test'
30
result = {
31
'ApplicationName': 'FooBar',
32
'TemplateName': 'x86_64_m1_medium_config',
33
'Description': 'This_is_a_test',
34
'OptionSettings': [
35
{'Namespace': 'aws:autoscaling:launchconfiguration',
36
'OptionName': 'EC2KeyName',
37
'Value': 'webapps'},
38
{'Namespace': 'aws:elasticbeanstalk:container:tomcat:jvmoptions',
39
'OptionName': 'Xms',
40
'Value': '1256m'}]}
41
self.assert_params_for_cmd(cmdline, result)
42
43