Пример #1
0
 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))
Пример #2
0
 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']])
Пример #3
0
 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))
Пример #4
0
 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()
Пример #5
0
 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()
Пример #6
0
 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']
     ])
Пример #7
0
 def test_resolve_not_found(self):
     with self.assertRaises(RuntimeError):
         Repo.resolve(get_all_repos(), 'definitely-not-a-repo')
Пример #8
0
 def test_resolve_short_name_conflict(self):
     with self.assertRaises(RuntimeError):
         Repo.resolve(get_all_repos(), 'a')
Пример #9
0
 def test_resolve_short_name(self):
     self.assertEqual(Repo.resolve(get_all_repos(), 'b'), Repo('github.com/app/b'))
Пример #10
0
 def test_resolve_full_name(self):
     self.assertEqual(Repo.resolve(get_all_repos(), 'github.com/app/a'), Repo('github.com/app/a'))
Пример #11
0
 def test_resolve_not_found(self):
     with self.assertRaises(RuntimeError):
         Repo.resolve(get_all_repos(), 'definitely-not-a-repo')
Пример #12
0
 def test_resolve_short_name_conflict(self):
     with self.assertRaises(RuntimeError):
         Repo.resolve(get_all_repos(), 'a')
Пример #13
0
 def test_resolve_short_name(self):
     self.assertEqual(Repo.resolve(get_all_repos(), 'b'),
                      Repo('github.com/app/b'))
Пример #14
0
 def test_resolve_full_name(self):
     self.assertEqual(Repo.resolve(get_all_repos(), 'github.com/app/a'),
                      Repo('github.com/app/a'))