diff --git a/nova/tests/test_iscsi.py b/nova/tests/test_iscsi.py index d0db6d62f..b88bd3fce 100644 --- a/nova/tests/test_iscsi.py +++ b/nova/tests/test_iscsi.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. +import os.path import string from nova import test @@ -32,6 +33,8 @@ class TargetAdminTestCase(object): self.vol_id = 'blaa' self.script_template = None + self.stubs.Set(os.path, 'isfile', lambda _: True) + self.stubs.Set(os, 'unlink', lambda _: '') def get_script_params(self): return {'tid': self.tid, @@ -87,7 +90,7 @@ class TgtAdmTestCase(test.TestCase, TargetAdminTestCase): self.script_template = "\n".join([ "tgt-admin --execute --conf ./blaa --update blaa", "tgtadm --op show --lld=iscsi --mode=target --tid=1", - "tgt-admin --conf ./blaa --delete blaa"]) + "tgt-admin --delete iqn.2010-10.org.openstack:volume-blaa"]) class IetAdmTestCase(test.TestCase, TargetAdminTestCase):