Skip to content

Commit 10fd0f2

Browse files
committed
Bring tests up to speed
Sorry for forgetting about this...
1 parent 58f893c commit 10fd0f2

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

hyperion/manager_tests.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def test_host_resolution(self):
3434
self.assertIsNotNone(self.cc.get_component_by_id('host_test@resolved-host'))
3535

3636
self.assertEqual(
37-
'host_test@resolved-host',
38-
host_test_comp['depends'][0],
39-
msg="Dependency host resolution failed. Expected 'host_test@resolved-host' but got '%s'" %
40-
host_test_comp['depends'][0]
37+
'host_test',
38+
host_test_comp['requires'][0],
39+
msg="Dependency host resolution failed. Expected 'host_test' but got '%s'" %
40+
host_test_comp['requires'][0]
4141
)
4242

4343
def test_initialization(self):
@@ -69,16 +69,16 @@ def test_setting_up_log(self):
6969
window.cmd("send-keys", 'ls', "Enter")
7070
self.cc._wait_until_window_not_busy(window)
7171
# Wait for log to be created
72-
time.sleep(.1)
72+
time.sleep(1)
7373
self.assertTrue(os.path.isfile(log_file))
7474

7575
def test_missing_dep(self):
76-
self.cc.config['groups'][0]['components'][0]['depends'][0] = 'dependency@missing'
76+
self.cc.config['groups'][0]['components'][0]['requires'][0] = 'dependency'
7777
with self.assertRaises(exceptions.UnmetDependenciesException):
7878
self.cc.set_dependencies()
7979

8080
def test_circular_dep(self):
81-
self.cc.config['groups'][1]['components'][1]['depends'] = ['top@localhost']
81+
self.cc.config['groups'][1]['components'][1]['requires'] = ['top']
8282
with self.assertRaises(exceptions.CircularReferenceException):
8383
self.cc.set_dependencies()
8484

@@ -92,6 +92,7 @@ def test_full_shutdown(self):
9292

9393
# Restore for tearDown()
9494
self.cc = manager.ControlCenter('%s/data/test-config.yaml' % manager.BASE_DIR)
95+
self.cc.init()
9596

9697

9798
class ComponentTest(unittest.TestCase):
@@ -122,12 +123,12 @@ def test_environment_loading(self):
122123
window = self.cc.session.new_window('unit test')
123124
self.cc._start_window(window, self.ls, '/tmp/Hyperion/unit-test/test.log')
124125
window.cmd('send-keys', '$env_test', 'Enter')
125-
time.sleep(0.2)
126+
time.sleep(1)
126127
self.assertFalse(self.cc._find_window('unit test'))
127128

128129
def test_multi_start(self):
129130
self.cc.start_component_without_deps(self.tail)
130-
time.sleep(0.3)
131+
time.sleep(0.7)
131132
self.cc.start_component_without_deps(self.tail)
132133

133134
ret = self.cc.check_component(self.tail)

0 commit comments

Comments
 (0)