File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 2020from ebcli .objects .exceptions import (
2121 AlreadyExistsError ,
2222 InvalidOptionsError ,
23- RetiredPlatformBranchError ,
2423 NotFoundError ,
2524)
2625from ebcli .objects .platform import PlatformVersion , PlatformBranch
4241)
4342from ebcli .operations .tagops import tagops
4443from ebcli .resources .strings import strings , prompts , flag_text , alerts
45- from ebcli .resources .statics import elb_names , platform_branch_lifecycle_states
44+ from ebcli .resources .statics import elb_names
4645
4746
4847class CreateController (AbstractBaseController ):
@@ -625,8 +624,6 @@ def _determine_platform(platform_string=None, iprofile=None):
625624 io .log_warning (prompts ['ecs.permissions' ])
626625 if isinstance (platform , PlatformVersion ):
627626 platform .hydrate (elasticbeanstalk .describe_platform_version )
628- if platform .platform_branch_lifecycle_state == platform_branch_lifecycle_states .RETIRED :
629- raise RetiredPlatformBranchError (alerts ['platformbranch.retired' ])
630627 statusops .alert_platform_status (platform )
631628 if 'Multi-container Docker' in platform .platform_name and not iprofile :
632629 io .log_warning (prompts ['ecs.permissions' ])
Original file line number Diff line number Diff line change 2626 AlreadyExistsError ,
2727 InvalidOptionsError ,
2828 NotFoundError ,
29- RetiredPlatformBranchError ,
3029)
3130from ebcli .objects .requests import CreateEnvironmentRequest
3231from ebcli .objects .platform import PlatformVersion
@@ -216,18 +215,16 @@ def test__determine_platform__with_retired_platform_branch(
216215 'PlatformBranchLifecycleState' : 'Retired'
217216 }
218217
219- self .assertRaises (
220- RetiredPlatformBranchError ,
221- create ._determine_platform ,
222- 'PHP 5.3 running on 64bit Amazon Linux' )
218+ result = create ._determine_platform ('PHP 5.3 running on 64bit Amazon Linux' )
223219
224220 get_configured_default_platform_mock .assert_not_called ()
225221 prompt_for_platform_mock .assert_not_called ()
226222 get_platform_for_platform_string_mock .assert_called_once_with (
227223 'PHP 5.3 running on 64bit Amazon Linux' )
228224 describe_platform_version_mock .assert_called_once_with (platform_version .platform_arn )
229225 log_warning_mock .assert_not_called ()
230- alert_platform_status_mock .assert_not_called ()
226+ alert_platform_status_mock .assert_called_once_with (platform_version )
227+ self .assertEqual (platform_version , result )
231228
232229 @mock .patch ('ebcli.controllers.create.platformops.get_configured_default_platform' )
233230 @mock .patch ('ebcli.controllers.create.platformops.prompt_for_platform' )
You can’t perform that action at this time.
0 commit comments