Example #1
0
 def test_add_zfs_apt_repository_raises_exception_on_failure(self, *args,
                                                             **kwargs):
     # force a failure by clearing /etc/resolv.conf
     sudo('echo > /etc/resolv.conf')
     with self.assertRaises(SystemExit) as cm:
         pkg.add_zfs_apt_repository()
     self.assertEqual(cm.exception.code, 1)
Example #2
0
 def test_add_zfs_apt_repository_raises_exception_on_failure(
         self, *args, **kwargs):
     # force a failure by clearing /etc/resolv.conf
     sudo('echo > /etc/resolv.conf')
     with self.assertRaises(SystemExit) as cm:
         pkg.add_zfs_apt_repository()
     self.assertEqual(cm.exception.code, 1)
Example #3
0
 def test_add_zfs_apt_repository_returns_True_on_sucess(self, *args,
                                                        **kwargs):
     self.assertTrue(pkg.add_zfs_apt_repository())
Example #4
0
 def test_add_zfs_apt_repository_installs_repository(self, *args, **kwargs):
     pkg.add_zfs_apt_repository()
     self.assertTrue(
         'zfs-native/stable' in sudo(
             'cat /etc/apt/sources.list.d/*'))
Example #5
0
 def test_add_zfs_apt_repository_returns_True_on_sucess(
         self, *args, **kwargs):
     self.assertTrue(pkg.add_zfs_apt_repository())
Example #6
0
 def test_add_zfs_apt_repository_installs_repository(self, *args, **kwargs):
     pkg.add_zfs_apt_repository()
     self.assertTrue(
         'zfs-native/stable' in sudo('cat /etc/apt/sources.list.d/*'))