diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-03-30 06:43:44 +0000 |
---|---|---|
committer | Tarmac <> | 2011-03-30 06:43:44 +0000 |
commit | f4595104348a3dbfdb5d28c1f5114b51c479db52 (patch) | |
tree | dcd7d3e0ef937868e9a2600e6532ac2453bbacdb | |
parent | cda715bf86373d47ad2f2f6655ad26e77f264868 (diff) | |
parent | 3a39fb7b09dfee3c971ae4adaeff4717f4839f8a (diff) | |
download | nova-f4595104348a3dbfdb5d28c1f5114b51c479db52.tar.gz nova-f4595104348a3dbfdb5d28c1f5114b51c479db52.tar.xz nova-f4595104348a3dbfdb5d28c1f5114b51c479db52.zip |
Uses the proc filesystem to check the volume size in volume smoketests so that it works with a very limited busybox image.
-rw-r--r-- | smoketests/test_sysadmin.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/smoketests/test_sysadmin.py b/smoketests/test_sysadmin.py index 9bed1e092..268d9865b 100644 --- a/smoketests/test_sysadmin.py +++ b/smoketests/test_sysadmin.py @@ -266,10 +266,11 @@ 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 + # NOTE(vish): 1G bytes / 512 bytes per block + 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)) |