コード例 #1
0
 def test_stop_target_addopts(self):
     """test command line stop target (addl options)"""
     dev = Utils.config_options('noformat_dev')
     tgt = self.fs.new_target(self.srv1, 'mgt', 0, dev)
     tgt.full_check(mountdata=False)
     action = StopTarget(tgt, addopts='-l')
     self.check_cmd(action, 'umount -l %s' % dev)
コード例 #2
0
 def test_stop_target(self):
     """test command line stop target"""
     dev = self.block1
     tgt = self.fs.new_target(self.srv1, 'mgt', 0, dev)
     tgt.full_check(mountdata=False)
     action = StopTarget(tgt)
     self.check_cmd(action, 'umount %s' % dev)
コード例 #3
0
 def stop(self, **kwargs):
     """Stop the local Target and check for system sanity."""
     return StopTarget(self, **kwargs)
コード例 #4
0
 def test_stop_target_file_device(self):
     """test command line stop target (file device)"""
     tgt = self.fs.new_target(self.srv1, 'mgt', 0, '/etc/passwd')
     tgt.full_check(mountdata=False)
     action = StopTarget(tgt)
     self.check_cmd(action, 'umount -d /etc/passwd')