def test_restart_sync(self): new_file_name = 'sync_file' repo = Repo.resolve(get_all_repos(include_specs_repo=False), 'repo-app-a') with open(os.path.join(repo.local_path, new_file_name), 'w+') as f: f.write('new file!') self.run_command('restart appa') self.assertFileInContainer('appa', os.path.join('/app/a/', new_file_name))
def setUp(self): super(TestRestartCLI, self).setUp() specs_fixture_with_depends() for repo in get_all_repos(include_specs_repo=False): self._set_up_fake_local_repo(path=repo.remote_path) self.run_command('bundles activate bundle-a bundle-b') self.run_command('up') self.up_complete_time = max([self.container_start_time(app) for app in ['appa', 'appb', 'appc']])
def setUp(self): super(TestRestartCLI, self).setUp() specs_fixture_with_depends() for repo in get_all_repos(include_specs_repo=False): self._set_up_fake_local_repo(path=repo.remote_path) self.run_command('bundles activate bundle-a bundle-b') self.run_command('up') time.sleep(.5) self.up_complete_time = datetime.datetime.utcnow()
def setUp(self): super(TestRestartCLI, self).setUp() specs_fixture_with_depends() for repo in get_all_repos(include_specs_repo=False): self._set_up_fake_local_repo(path=repo.remote_path) self.run_command('bundles activate bundle-a bundle-b') self.run_command('up') time.sleep(.1) self.up_complete_time = datetime.datetime.utcnow()
def setUp(self): super(TestRestartCLI, self).setUp() specs_fixture_with_depends() for repo in get_all_repos(include_specs_repo=False): self._set_up_fake_local_repo(path=repo.remote_path) self.run_command('bundles activate bundle-a bundle-b') self.run_command('up') self.up_complete_time = max([ self.container_start_time(app) for app in ['appa', 'appb', 'appc'] ])
def test_resolve_not_found(self): with self.assertRaises(RuntimeError): Repo.resolve(get_all_repos(), 'definitely-not-a-repo')
def test_resolve_short_name_conflict(self): with self.assertRaises(RuntimeError): Repo.resolve(get_all_repos(), 'a')
def test_resolve_short_name(self): self.assertEqual(Repo.resolve(get_all_repos(), 'b'), Repo('github.com/app/b'))
def test_resolve_full_name(self): self.assertEqual(Repo.resolve(get_all_repos(), 'github.com/app/a'), Repo('github.com/app/a'))