chiark / gitweb /
systemd-sysv-generator test: fix enabled check
authorMartin Pitt <martin.pitt@ubuntu.com>
Wed, 21 Jan 2015 09:21:08 +0000 (10:21 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 21 Jan 2015 09:22:10 +0000 (10:22 +0100)
Fix hardcoded "foo.service", test for the actual unit parameter.

test/sysv-generator-test.py

index 492e99d..2a84f9f 100644 (file)
@@ -133,11 +133,11 @@ class SysvGeneratorTest(unittest.TestCase):
 
         # should be enabled
         for runlevel in all_runlevels:
-            link = os.path.join(self.out_dir, 'runlevel%i.target.wants' % runlevel, 'foo.service')
+            link = os.path.join(self.out_dir, 'runlevel%i.target.wants' % runlevel, unit)
             if runlevel in runlevels:
                 target = os.readlink(link)
                 self.assertTrue(os.path.exists(target))
-                self.assertEqual(os.path.basename(target), 'foo.service')
+                self.assertEqual(os.path.basename(target), unit)
             else:
                 self.assertFalse(os.path.exists(link),
                                  '%s unexpectedly exists' % link)