예제 #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'))