diff options
author | Soren Hansen <soren@linux2go.dk> | 2011-03-18 11:06:58 +0100 |
---|---|---|
committer | Soren Hansen <soren@linux2go.dk> | 2011-03-18 11:06:58 +0100 |
commit | 9608ef7d49dd5181f45bd458cea676f79116c39f (patch) | |
tree | 41217d91d57ab51b9293ae8b1ef82c30231afe24 /smoketests | |
parent | 83523c125af0fcdc740373332bd5a2d4f233dd0e (diff) | |
download | nova-9608ef7d49dd5181f45bd458cea676f79116c39f.tar.gz nova-9608ef7d49dd5181f45bd458cea676f79116c39f.tar.xz nova-9608ef7d49dd5181f45bd458cea676f79116c39f.zip |
Query the size of the block device, not the size of the filesystem.
Diffstat (limited to 'smoketests')
-rw-r--r-- | smoketests/sysadmin_smoketests.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/smoketests/sysadmin_smoketests.py b/smoketests/sysadmin_smoketests.py index 1e593e963..3adb1e0f0 100644 --- a/smoketests/sysadmin_smoketests.py +++ b/smoketests/sysadmin_smoketests.py @@ -255,12 +255,13 @@ class VolumeTests(base.UserSmokeTestCase): ip = self.data['instance'].private_dns_name conn = self.connect_ssh(ip, TEST_KEY) stdin, stdout, stderr = conn.exec_command( - "df -h | grep %s | awk {'print $2'}" % self.device) - out = stdout.read() + "blockdev --getsize64 %s" % self.device) + out = stdout.read().strip() conn.close() - if not out.strip() == '1007.9M': - self.fail('Volume is not the right size: %s %s' % - (out, stderr.read())) + expected_size = 1024*1024*1024 + self.assertEquals('%s' % (expected_size,), out, + 'Volume is not the right size: %s %s. Expected: %s' % + (out, stderr.read(), expected_size)) def test_006_me_can_umount_volume(self): ip = self.data['instance'].private_dns_name |