diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oeqa/selftest/cases/updater_qemux86_64.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64.py b/lib/oeqa/selftest/cases/updater_qemux86_64.py index bef6cdc..9f32bcf 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64.py | |||
@@ -341,11 +341,6 @@ class SecondaryTests(OESelftestTestCase): | |||
341 | self.assertEqual(retcode, 0, "Unable to run aktualizr-secondary --help") | 341 | self.assertEqual(retcode, 0, "Unable to run aktualizr-secondary --help") |
342 | self.assertEqual(stderr, b'', 'Error: ' + stderr.decode()) | 342 | self.assertEqual(stderr, b'', 'Error: ' + stderr.decode()) |
343 | 343 | ||
344 | def test_secondary_listening(self): | ||
345 | print('Checking aktualizr-secondary service is listening') | ||
346 | stdout, stderr, retcode = self.qemu_command('aktualizr-check-discovery') | ||
347 | self.assertEqual(retcode, 0, "Unable to connect to secondary") | ||
348 | |||
349 | 344 | ||
350 | class PrimaryTests(OESelftestTestCase): | 345 | class PrimaryTests(OESelftestTestCase): |
351 | def setUpLocal(self): | 346 | def setUpLocal(self): |
@@ -413,11 +408,18 @@ class ResourceControlTests(OESelftestTestCase): | |||
413 | 408 | ||
414 | def test_aktualizr_resource_control(self): | 409 | def test_aktualizr_resource_control(self): |
415 | print('Checking aktualizr was killed') | 410 | print('Checking aktualizr was killed') |
416 | stdout, stderr, retcode = self.qemu_command('systemctl --no-pager show aktualizr') | 411 | ran_ok = False |
412 | for delay in [5, 5, 5, 5]: | ||
413 | sleep(delay) | ||
414 | stdout, stderr, retcode = self.qemu_command('systemctl --no-pager show aktualizr') | ||
415 | if retcode == 0 and b'ExecMainStatus=9' in stdout: | ||
416 | ran_ok = True | ||
417 | break | ||
418 | self.assertTrue(ran_ok, 'Aktualizr was not killed') | ||
419 | |||
417 | self.assertIn(b'CPUWeight=1000', stdout, 'CPUWeight was not set correctly') | 420 | self.assertIn(b'CPUWeight=1000', stdout, 'CPUWeight was not set correctly') |
418 | self.assertIn(b'MemoryHigh=52428800', stdout, 'MemoryHigh was not set correctly') | 421 | self.assertIn(b'MemoryHigh=52428800', stdout, 'MemoryHigh was not set correctly') |
419 | self.assertIn(b'MemoryMax=1048576', stdout, 'MemoryMax was not set correctly') | 422 | self.assertIn(b'MemoryMax=1048576', stdout, 'MemoryMax was not set correctly') |
420 | self.assertIn(b'ExecMainStatus=9', stdout, 'Aktualizr was not killed') | ||
421 | 423 | ||
422 | self.qemu_command('systemctl --runtime set-property aktualizr MemoryMax=') | 424 | self.qemu_command('systemctl --runtime set-property aktualizr MemoryMax=') |
423 | self.qemu_command('systemctl restart aktualizr') | 425 | self.qemu_command('systemctl restart aktualizr') |