'If writing the config fails then CreateConfigurationError
is raised.'

@skip_on_broken_permissions
def test_config_write_failed(self):

    path = FilePath(self.mktemp())
    path.makedirs()
    path.chmod(0)
    self.addCleanup(path.chmod, 511)
    path = path.child('config.json')
    service = VolumeService(path, FilesystemStoragePool(FilePath(self.mktemp())), reactor=Clock())
    with attempt_effective_uid('nobody', suppress_errors=True):
        self.assertRaises(CreateConfigurationError, service.startService)
