diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-06-24 04:11:59 +0100 |
|---|---|---|
| committer | andy <github@anarkystic.com> | 2010-06-24 04:11:59 +0100 |
| commit | 1c9c2ce22726dd460f486f10a2fcb9f14cc23286 (patch) | |
| tree | 8c088afde44b8471e4c9e04bb6e80a11f52d1e9c | |
| parent | f8f408c06a0cd670a87dbe114f3bca212549b825 (diff) | |
Fix mount of drive for test image
| -rw-r--r-- | smoketests/smoketest.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/smoketests/smoketest.py b/smoketests/smoketest.py index 66de274b1..09cb37b3a 100644 --- a/smoketests/smoketest.py +++ b/smoketests/smoketest.py @@ -386,7 +386,7 @@ class ElasticIPTests(NovaTestCase): data = {} ZONE = 'nova' -DEVICE = '/dev/vdb' +DEVICE = 'vdb' # Test iscsi volumes class VolumeTests(NovaTestCase): def test_000_setUp(self): @@ -418,12 +418,20 @@ class VolumeTests(NovaTestCase): conn.attach_volume( volume_id = data['volume_id'], instance_id = data['instance_id'], - device = DEVICE + device = '/dev/%s' % DEVICE ) def test_003_me_can_mount_volume(self): conn = self.connect_ssh(data['private_ip'], test_key) - stdin, stdout, stderr = conn.exec_command('mkdir -p /mnt/vol && mkfs.ext3 %s && mount %s /mnt/vol && echo success' % (DEVICE, DEVICE)) + # HACK: the tiny image doesn't create the node properly + # this will make /dev/vd* if it doesn't exist + 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('echo success') + stdin, stdout, stderr = conn.exec_command(commands.join(' && ')) out = stdout.read() conn.close() if not out.strip().endswith('success'): |
