'When successful, ``VolumeScript._create_volume_service`` returns a
running ``VolumeService`` initialized with the pool, mountpoint, and
configuration path given by the ``options`` argument.'

def test_options(self):

    pool = 'some-pool'
    mountpoint = FilePath(self.mktemp())
    config = FilePath(self.mktemp())
    options = VolumeOptions()
    options.parseOptions(['--config', config.path, '--pool', pool, '--mountpoint', mountpoint.path])
    stderr = StringIO()
    reactor = object()
    service = VolumeScript._create_volume_service(stderr, reactor, options)
    self.assertEqual((True, config, StoragePool(reactor, pool, mountpoint)), (service.running, service._config_path, service.pool))
