summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-06-24 04:11:59 +0100
committerandy <github@anarkystic.com>2010-06-24 04:11:59 +0100
commitfc5492bf3fff5360f6ffe85c85540e1f0d6a7a10 (patch)
treea06200b1d4133ed0117a52b464cb67e6782724d9
parent20bc71348d67c361af04de7cff7517573fe5f366 (diff)
downloadnova-fc5492bf3fff5360f6ffe85c85540e1f0d6a7a10.tar.gz
nova-fc5492bf3fff5360f6ffe85c85540e1f0d6a7a10.tar.xz
nova-fc5492bf3fff5360f6ffe85c85540e1f0d6a7a10.zip
More volume test fixes
-rw-r--r--smoketests/smoketest.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/smoketests/smoketest.py b/smoketests/smoketest.py
index 09cb37b3a..aa03037de 100644
--- a/smoketests/smoketest.py
+++ b/smoketests/smoketest.py
@@ -412,6 +412,8 @@ class VolumeTests(NovaTestCase):
volume = conn.create_volume(1, ZONE)
self.assertEqual(volume.size, 1)
data['volume_id'] = volume.id
+ # give network time to find volume
+ time.sleep(5)
def test_002_me_can_attach_volume(self):
conn = self.connection_for(test_username)
@@ -420,6 +422,8 @@ class VolumeTests(NovaTestCase):
instance_id = data['instance_id'],
device = '/dev/%s' % DEVICE
)
+ # give instance time to recognize volume
+ time.sleep(5)
def test_003_me_can_mount_volume(self):
conn = self.connect_ssh(data['private_ip'], test_key)
@@ -428,10 +432,10 @@ class VolumeTests(NovaTestCase):
stdin, stdout, stderr = conn.exec_command('grep %s /proc/partitions | `awk \'{print "mknod /dev/"$4" b "$1" "$2}\'`' % DEVICE)
commands = []
commands.append('mkdir -p /mnt/vol')
- commands.append('mkfs.ext3 %s' % DEVICE)
- commands.append('mount %s /mnt/vol' % DEVICE)
+ commands.append('mkfs.ext2 /dev/%s' % DEVICE)
+ commands.append('mount /dev/%s /mnt/vol' % DEVICE)
commands.append('echo success')
- stdin, stdout, stderr = conn.exec_command(commands.join(' && '))
+ stdin, stdout, stderr = conn.exec_command(' && '.join(commands))
out = stdout.read()
conn.close()
if not out.strip().endswith('success'):
@@ -451,7 +455,7 @@ class VolumeTests(NovaTestCase):
stdin, stdout, stderr = conn.exec_command("df -h | grep %s | awk {'print $2'}" % DEVICE)
out = stdout.read()
conn.close()
- if not out.strip() == '1008M':
+ if not out.strip() == '1007.9M':
self.fail('Volume is not the right size: %s %s' % (out, stderr.read()))
def test_006_me_can_umount_volume(self):