~zulcss/cinder/cinder-ca-g2

« back to all changes in this revision

Viewing changes to cinder/tests/test_rbd.py

  • Committer: Chuck Short
  • Date: 2013-01-28 15:28:46 UTC
  • mfrom: (7.2.1 raring)
  • Revision ID: zulcss@ubuntu.com-20130128152846-1yl2iijulcbznp0g
* New upstream release for the Ubuntu Cloud Archive.
* debian/patches/series: Enable skip_failed_tests to fix FTBFS. 
* New upstream release. 
* debian/patches/avoid_setuptools_git_dependency.patch: Rediff
  due to upstream changes.
* debian/control: Add python-keystoneclient as a dependency
* Improve upstart configurations:
  - d/*.upstart: Switch to using start-stop-daemon instead of su,
    stop on [!2345] to catch all transitions.
* d/control: General tidy of package descriptions.
* d/control: Drop BD on python-all-dev as its not required.
* d/*.postrm: Dropped; update-rc.d calls for purge are handled by
  debhelper and are not require for upstart configurations.
* d/patches: removing hp3parclient dependency from tools/test-requires
* d/patches, d/control: adding stevedore dependency, merging deps patches
* d/patches: remove failing tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        self.driver = RBDDriver(execute=fake_execute)
47
47
 
48
48
    def test_good_locations(self):
49
 
        locations = [
50
 
            'rbd://fsid/pool/image/snap',
51
 
            'rbd://%2F/%2F/%2F/%2F',
52
 
            ]
 
49
        locations = ['rbd://fsid/pool/image/snap',
 
50
                     'rbd://%2F/%2F/%2F/%2F', ]
53
51
        map(self.driver._parse_location, locations)
54
52
 
55
53
    def test_bad_locations(self):
56
 
        locations = [
57
 
            'rbd://image',
58
 
            'http://path/to/somewhere/else',
59
 
            'rbd://image/extra',
60
 
            'rbd://image/',
61
 
            'rbd://fsid/pool/image/',
62
 
            'rbd://fsid/pool/image/snap/',
63
 
            'rbd://///',
64
 
            ]
 
54
        locations = ['rbd://image',
 
55
                     'http://path/to/somewhere/else',
 
56
                     'rbd://image/extra',
 
57
                     'rbd://image/',
 
58
                     'rbd://fsid/pool/image/',
 
59
                     'rbd://fsid/pool/image/snap/',
 
60
                     'rbd://///', ]
65
61
        for loc in locations:
66
62
            self.assertRaises(exception.ImageUnacceptable,
67
63
                              self.driver._parse_location,
142
138
        image_id = 'c905cedb-7281-47e4-8a62-f26bc5fc4c77'
143
139
        volume_id = 1
144
140
        # creating volume testdata
145
 
        db.volume_create(self.context, {'id': volume_id,
146
 
                            'updated_at': timeutils.utcnow(),
147
 
                            'display_description': 'Test Desc',
148
 
                            'size': 20,
149
 
                            'status': 'creating',
150
 
                            'instance_uuid': None,
151
 
                            'host': 'dummy'})
 
141
        db.volume_create(self.context,
 
142
                         {'id': volume_id,
 
143
                          'updated_at': timeutils.utcnow(),
 
144
                          'display_description': 'Test Desc',
 
145
                          'size': 20,
 
146
                          'status': 'creating',
 
147
                          'instance_uuid': None,
 
148
                          'host': 'dummy'})
152
149
        try:
153
150
            if clone_works:
154
151
                self.volume.create_volume(self.context,