Query the size of the block device, not the size of the filesystem.

This commit is contained in:
Soren Hansen 2011-03-18 11:06:58 +01:00
parent 83523c125a
commit 9608ef7d49

@ -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