@@ -50,6 +50,7 @@ def setUp(self):
5050 self .use_changeset = True
5151 self .resolve_image_repos = False
5252 self .disable_rollback = False
53+ self .import_existing_resources = False
5354 self .on_failure = None
5455 self .max_wait_duration = 480
5556 MOCK_SAM_CONFIG .reset_mock ()
@@ -103,6 +104,7 @@ def test_all_args(self, mock_deploy_context, mock_deploy_click, mock_package_con
103104 config_file = self .config_file ,
104105 resolve_image_repos = self .resolve_image_repos ,
105106 disable_rollback = self .disable_rollback ,
107+ import_existing_resources = self .import_existing_resources ,
106108 on_failure = self .on_failure ,
107109 max_wait_duration = self .max_wait_duration ,
108110 )
@@ -130,6 +132,7 @@ def test_all_args(self, mock_deploy_context, mock_deploy_click, mock_package_con
130132 signing_profiles = self .signing_profiles ,
131133 use_changeset = self .use_changeset ,
132134 disable_rollback = self .disable_rollback ,
135+ import_existing_resources = self .import_existing_resources ,
133136 poll_delay = os .getenv ("SAM_CLI_POLL_DELAY" ),
134137 on_failure = self .on_failure ,
135138 max_wait_duration = self .max_wait_duration ,
@@ -221,6 +224,7 @@ def test_all_args_guided_no_to_authorization_confirmation_prompt(
221224 config_file = self .config_file ,
222225 resolve_image_repos = self .resolve_image_repos ,
223226 disable_rollback = self .disable_rollback ,
227+ import_existing_resources = self .import_existing_resources ,
224228 on_failure = self .on_failure ,
225229 max_wait_duration = self .max_wait_duration ,
226230 )
@@ -323,6 +327,7 @@ def test_all_args_guided_use_defaults(
323327 config_file = self .config_file ,
324328 resolve_image_repos = self .resolve_image_repos ,
325329 disable_rollback = self .disable_rollback ,
330+ import_existing_resources = self .import_existing_resources ,
326331 on_failure = self .on_failure ,
327332 max_wait_duration = self .max_wait_duration ,
328333 )
@@ -350,6 +355,7 @@ def test_all_args_guided_use_defaults(
350355 signing_profiles = self .signing_profiles ,
351356 use_changeset = self .use_changeset ,
352357 disable_rollback = True ,
358+ import_existing_resources = False ,
353359 poll_delay = 5 ,
354360 on_failure = self .on_failure ,
355361 max_wait_duration = self .max_wait_duration ,
@@ -469,6 +475,7 @@ def test_all_args_guided(
469475 config_file = self .config_file ,
470476 resolve_image_repos = self .resolve_image_repos ,
471477 disable_rollback = self .disable_rollback ,
478+ import_existing_resources = self .import_existing_resources ,
472479 on_failure = self .on_failure ,
473480 max_wait_duration = self .max_wait_duration ,
474481 )
@@ -496,6 +503,7 @@ def test_all_args_guided(
496503 signing_profiles = self .signing_profiles ,
497504 use_changeset = self .use_changeset ,
498505 disable_rollback = True ,
506+ import_existing_resources = False ,
499507 poll_delay = 5 ,
500508 on_failure = self .on_failure ,
501509 max_wait_duration = self .max_wait_duration ,
@@ -618,6 +626,7 @@ def test_all_args_guided_no_save_echo_param_to_config(
618626 config_file = self .config_file ,
619627 resolve_image_repos = self .resolve_image_repos ,
620628 disable_rollback = self .disable_rollback ,
629+ import_existing_resources = self .import_existing_resources ,
621630 on_failure = self .on_failure ,
622631 max_wait_duration = self .max_wait_duration ,
623632 )
@@ -649,6 +658,7 @@ def test_all_args_guided_no_save_echo_param_to_config(
649658 signing_profiles = self .signing_profiles ,
650659 use_changeset = self .use_changeset ,
651660 disable_rollback = True ,
661+ import_existing_resources = False ,
652662 poll_delay = 5 ,
653663 on_failure = self .on_failure ,
654664 max_wait_duration = self .max_wait_duration ,
@@ -778,6 +788,7 @@ def test_all_args_guided_no_params_save_config(
778788 signing_profiles = self .signing_profiles ,
779789 resolve_image_repos = self .resolve_image_repos ,
780790 disable_rollback = self .disable_rollback ,
791+ import_existing_resources = self .import_existing_resources ,
781792 on_failure = self .on_failure ,
782793 max_wait_duration = self .max_wait_duration ,
783794 )
@@ -805,6 +816,7 @@ def test_all_args_guided_no_params_save_config(
805816 signing_profiles = self .signing_profiles ,
806817 use_changeset = self .use_changeset ,
807818 disable_rollback = True ,
819+ import_existing_resources = False ,
808820 poll_delay = 5 ,
809821 on_failure = self .on_failure ,
810822 max_wait_duration = self .max_wait_duration ,
@@ -918,6 +930,7 @@ def test_all_args_guided_no_params_no_save_config(
918930 signing_profiles = self .signing_profiles ,
919931 resolve_image_repos = self .resolve_image_repos ,
920932 disable_rollback = self .disable_rollback ,
933+ import_existing_resources = self .import_existing_resources ,
921934 on_failure = self .on_failure ,
922935 max_wait_duration = self .max_wait_duration ,
923936 )
@@ -945,6 +958,7 @@ def test_all_args_guided_no_params_no_save_config(
945958 signing_profiles = self .signing_profiles ,
946959 use_changeset = self .use_changeset ,
947960 disable_rollback = self .disable_rollback ,
961+ import_existing_resources = self .import_existing_resources ,
948962 poll_delay = 5 ,
949963 on_failure = self .on_failure ,
950964 max_wait_duration = self .max_wait_duration ,
@@ -996,6 +1010,7 @@ def test_all_args_resolve_s3(
9961010 signing_profiles = self .signing_profiles ,
9971011 resolve_image_repos = self .resolve_image_repos ,
9981012 disable_rollback = self .disable_rollback ,
1013+ import_existing_resources = self .import_existing_resources ,
9991014 on_failure = self .on_failure ,
10001015 max_wait_duration = self .max_wait_duration ,
10011016 )
@@ -1023,6 +1038,7 @@ def test_all_args_resolve_s3(
10231038 signing_profiles = self .signing_profiles ,
10241039 use_changeset = self .use_changeset ,
10251040 disable_rollback = self .disable_rollback ,
1041+ import_existing_resources = self .import_existing_resources ,
10261042 poll_delay = 5 ,
10271043 on_failure = self .on_failure ,
10281044 max_wait_duration = self .max_wait_duration ,
@@ -1062,6 +1078,7 @@ def test_resolve_s3_and_s3_bucket_both_set(self):
10621078 signing_profiles = self .signing_profiles ,
10631079 resolve_image_repos = self .resolve_image_repos ,
10641080 disable_rollback = self .disable_rollback ,
1081+ import_existing_resources = self .import_existing_resources ,
10651082 on_failure = self .on_failure ,
10661083 max_wait_duration = self .max_wait_duration ,
10671084 )
@@ -1114,6 +1131,7 @@ def test_all_args_resolve_image_repos(
11141131 signing_profiles = self .signing_profiles ,
11151132 resolve_image_repos = True ,
11161133 disable_rollback = self .disable_rollback ,
1134+ import_existing_resources = self .import_existing_resources ,
11171135 on_failure = self .on_failure ,
11181136 max_wait_duration = self .max_wait_duration ,
11191137 )
@@ -1141,6 +1159,7 @@ def test_all_args_resolve_image_repos(
11411159 signing_profiles = self .signing_profiles ,
11421160 use_changeset = True ,
11431161 disable_rollback = self .disable_rollback ,
1162+ import_existing_resources = self .import_existing_resources ,
11441163 poll_delay = 5 ,
11451164 on_failure = self .on_failure ,
11461165 max_wait_duration = self .max_wait_duration ,
@@ -1189,6 +1208,7 @@ def test_passing_parameter_overrides_to_context(
11891208 config_file = self .config_file ,
11901209 resolve_image_repos = self .resolve_image_repos ,
11911210 disable_rollback = self .disable_rollback ,
1211+ import_existing_resources = self .import_existing_resources ,
11921212 on_failure = self .on_failure ,
11931213 max_wait_duration = self .max_wait_duration ,
11941214 )
@@ -1216,6 +1236,7 @@ def test_passing_parameter_overrides_to_context(
12161236 signing_profiles = self .signing_profiles ,
12171237 use_changeset = self .use_changeset ,
12181238 disable_rollback = self .disable_rollback ,
1239+ import_existing_resources = self .import_existing_resources ,
12191240 poll_delay = os .getenv ("SAM_CLI_POLL_DELAY" ),
12201241 on_failure = self .on_failure ,
12211242 max_wait_duration = self .max_wait_duration ,
0 commit comments