'Test extending a volume, check the size in GB vs. GiB.'

def test_extend_volume(self):

    ctxt = context.get_admin_context()
    extra_specs = {}
    type_ref = volume_types.create(ctxt, 'hgst-1', extra_specs)
    volume = {'id': '1', 'name': 'volume1', 'display_name': '', 'volume_type_id': type_ref['id'], 'size': 10, 'provider_id': 'volume10'}
    self.extended = {'name': '', 'size': '0', 'storageserver': ''}
    self.driver.extend_volume(volume, 12)
    expected = {'name': 'volume10', 'size': '2', 'storageserver': 'stor1:gbd0,stor2:gbd0,'}
    self.assertDictEqual(expected, self.extended)
