~ubuntu-branches/ubuntu/trusty/cinder/trusty

« back to all changes in this revision

Viewing changes to cinder/tests/test_iscsi.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Yolanda Robla Mota, James Page, Chuck Short
  • Date: 2013-02-22 10:45:17 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130222104517-ng3r6ace9vi4m869
Tags: 2013.1.g3-0ubuntu1
[ Yolanda Robla Mota ]
* d/control: Add BD on python-hp3parclient.
* d/patches: Drop patches related to disabling hp3parclient.

[ James Page ]
* d/control: Add Suggests: python-hp3parclient for python-cinder.
* d/control: Add BD on python-oslo-config.
* d/*: Wrapped and sorted.

[ Chuck Short ]
* New upstream release.
* debian/rules, debian/cinder-volumes.install: 
  - Fail if binaries are missing and install missing binaries.
* debian/patches/fix-ubuntu-tests.patch: Fix failing tests.
* debian/control: Add python-rtslib and python-mock.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        self.stubs.Set(os.path, 'isfile', lambda _: True)
39
39
        self.stubs.Set(os, 'unlink', lambda _: '')
40
40
        self.stubs.Set(iscsi.TgtAdm, '_get_target', self.fake_get_target)
 
41
        self.stubs.Set(iscsi.LioAdm, '_get_target', self.fake_get_target)
 
42
        self.stubs.Set(iscsi.LioAdm, '__init__', self.fake_init)
 
43
 
 
44
    def fake_init(obj):
 
45
        return
41
46
 
42
47
    def fake_get_target(obj, iqn):
43
48
        return 1
119
124
            'ietadm --op show --tid=%(tid)s',
120
125
            'ietadm --op delete --tid=%(tid)s --lun=%(lun)s',
121
126
            'ietadm --op delete --tid=%(tid)s'])
 
127
 
 
128
 
 
129
class LioAdmTestCase(test.TestCase, TargetAdminTestCase):
 
130
 
 
131
    def setUp(self):
 
132
        super(LioAdmTestCase, self).setUp()
 
133
        TargetAdminTestCase.setUp(self)
 
134
        self.persist_tempdir = tempfile.mkdtemp()
 
135
        self.flags(iscsi_helper='lioadm')
 
136
        self.script_template = "\n".join([
 
137
            'cinder-rtstool create '
 
138
                '/foo iqn.2011-09.org.foo.bar:blaa test_id test_pass',
 
139
            'cinder-rtstool delete iqn.2010-10.org.openstack:volume-blaa'])