diff options
| author | Joshua McKenty <jmckenty@joshua-mckentys-macbook-pro.local> | 2010-06-24 13:50:59 -0700 |
|---|---|---|
| committer | Joshua McKenty <jmckenty@joshua-mckentys-macbook-pro.local> | 2010-06-24 13:50:59 -0700 |
| commit | 8a2f1763cbadd47f6ce26467ac9f82bc9b436d2a (patch) | |
| tree | 890fd1ca6a63a8fe14e84396950d1fc3ce803241 | |
| parent | 344b03071e3b3e56b689ea6e1fb5a0bc2242089c (diff) | |
| download | nova-8a2f1763cbadd47f6ce26467ac9f82bc9b436d2a.tar.gz nova-8a2f1763cbadd47f6ce26467ac9f82bc9b436d2a.tar.xz nova-8a2f1763cbadd47f6ce26467ac9f82bc9b436d2a.zip | |
Create Volume should only take an integer between 0 and 1000
| -rw-r--r-- | nova/volume/storage.py | 2 | ||||
| -rw-r--r-- | smoketests/smoketest.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/nova/volume/storage.py b/nova/volume/storage.py index 1401aef1d..9c58358bd 100644 --- a/nova/volume/storage.py +++ b/nova/volume/storage.py @@ -90,7 +90,7 @@ class BlockStore(object): #TODO: aggregate the state of the system pass - @validate.rangetest(size=(0, 100)) + @validate.rangetest(size=(0, 1000)) def create_volume(self, size, user_id, project_id): """ Creates an exported volume (fake or real), diff --git a/smoketests/smoketest.py b/smoketests/smoketest.py index 26e167c8f..f7794a0ff 100644 --- a/smoketests/smoketest.py +++ b/smoketests/smoketest.py @@ -509,6 +509,10 @@ class VolumeTests(NovaTestCase): conn = self.connection_for(test_username) self.assertTrue(conn.delete_volume(data['volume_id'])) + def test_009_volume_size_must_be_int(self): + conn = self.connection_for(test_username) + self.assertRaises(Exception, conn.create_volume, 'foo', ZONE) + def test_999_tearDown(self): global data conn = self.connection_for(test_username) |
