@@ -169,6 +169,27 @@ def test_sync_apps_already_up_to_date(self):
169169 call .logging .info ("Root repository already up-to-date. I'm done here." ),
170170 ]
171171
172+ def test_sync_apps_bootstrap_chart (self ):
173+ self .yaml_file_load_mock .side_effect = lambda file_path : {
174+ "/tmp/root-config-repo/bootstrap/values.yaml" : {
175+ "config" : {
176+ "bootstrap" : [{"name" : "team-non-prod" }, {"name" : "other-team-non-prod" }],
177+ }
178+ },
179+ "/tmp/root-config-repo/apps/team-non-prod.yaml" : {
180+ "repository" : "https://team.config.repo.git" ,
181+ "applications" : {"my-app" : None }, # my-app already exists
182+ },
183+ "/tmp/root-config-repo/apps/other-team-non-prod.yaml" : {
184+ "repository" : "https://other-team.config.repo.git" ,
185+ "applications" : {},
186+ },
187+ }[file_path ]
188+ try :
189+ SyncAppsCommand (ARGS ).execute ()
190+ except GitOpsException :
191+ self .fail ("'config.bootstrap' should be read correctly'" )
192+
172193 def test_sync_apps_bootstrap_yaml_not_found (self ):
173194 self .yaml_file_load_mock .side_effect = FileNotFoundError ()
174195
@@ -199,7 +220,7 @@ def test_sync_apps_missing_bootstrap_element_in_bootstrap_yaml(self):
199220 SyncAppsCommand (ARGS ).execute ()
200221 self .fail ()
201222 except GitOpsException as ex :
202- self .assertEqual ("Cannot find key 'bootstrap' in 'bootstrap/values.yaml'" , str (ex ))
223+ self .assertEqual ("Cannot find key 'bootstrap' or 'config.bootstrap' in 'bootstrap/values.yaml'" , str (ex ))
203224
204225 def test_sync_apps_invalid_bootstrap_entry_in_bootstrap_yaml (self ):
205226 self .yaml_file_load_mock .side_effect = lambda file_path : {
0 commit comments