Ejemplo n.º 1
0
 def test_restart_apps_or_services_without_arguments_1(self, fake_get_assembled_specs, fake_get_specs, fake_nfs, fake_restart):
     fake_get_assembled_specs.return_value = self.specs
     fake_get_specs.return_value = self.specs
     restart_apps_or_services()
     fake_nfs.update_nfs_with_repos.assert_has_calls([call(set([Repo('github.com/app/a'), Repo('github.com/app/b'),
                                                       Repo('github.com/lib/a'), Repo('github.com/lib/b')]))])
Ejemplo n.º 2
0
 def test_restart_apps_or_services_with_arguments_3(self,fake_get_assembled_specs, fake_rsync, fake_restart):
     fake_get_assembled_specs.return_value = self.specs
     restart_apps_or_services(['app-a', 'ser-a'])
     fake_rsync.sync_repos_by_specs.assert_has_calls([call([self.specs['apps'][name] for name in ['app-a']])])
Ejemplo n.º 3
0
 def test_restart_apps_or_services_without_arguments_no_sync(self,fake_get_assembled_specs, fake_get_specs, fake_rsync, fake_restart):
     fake_get_assembled_specs.return_value = self.specs
     fake_get_specs.return_value = self.specs
     restart_apps_or_services(sync=False)
     self.assertFalse(fake_rsync.sync_repos.called)
Ejemplo n.º 4
0
 def test_restart_apps_or_services_with_arguments_no_sync(self,fake_get_assembled_specs, fake_rsync, fake_restart):
     fake_get_assembled_specs.return_value = self.specs
     restart_apps_or_services(['app-a', 'app-b'], sync=False)
     self.assertFalse(fake_rsync.sync_repos_by_app_name.called)