Fixes volume smoketests to work with ami-tty

This commit is contained in:
Vishvananda Ishaya
2011-03-28 15:46:01 -07:00
parent e025ede777
commit 233fd09201
+2 -2
View File
@@ -266,10 +266,10 @@ class VolumeTests(base.UserSmokeTestCase):
ip = self.data['instance'].private_dns_name
conn = self.connect_ssh(ip, TEST_KEY)
stdin, stdout, stderr = conn.exec_command(
"blockdev --getsize64 %s" % self.device)
"cat /sys/class/block/%s/size" % self.device.rpartition('/')[2])
out = stdout.read().strip()
conn.close()
expected_size = 1024 * 1024 * 1024
expected_size = 1024 * 1024 * 1024 / 512
self.assertEquals('%s' % (expected_size,), out,
'Volume is not the right size: %s %s. Expected: %s' %
(out, stderr.read(), expected_size))