2014-06-13 07:27:02 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2014-06-13 07:27:02 -04:00
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2014-06-13 07:27:02 -04:00
|
|
|
*/
|
|
|
|
|
|
2016-05-20 09:38:20 -04:00
|
|
|
namespace Test\Files\ObjectStore;
|
2014-06-13 07:27:02 -04:00
|
|
|
|
2016-05-19 02:41:01 -04:00
|
|
|
use OC\Files\ObjectStore\Swift;
|
2025-06-30 10:56:59 -04:00
|
|
|
use OCP\Files\ObjectStore\IObjectStore;
|
2025-06-12 12:31:58 -04:00
|
|
|
use OCP\IConfig;
|
|
|
|
|
use OCP\Server;
|
2014-06-13 07:27:02 -04:00
|
|
|
|
2018-02-07 11:16:54 -05:00
|
|
|
/**
|
|
|
|
|
* @group PRIMARY-swift
|
|
|
|
|
*/
|
2025-05-12 10:17:59 -04:00
|
|
|
class SwiftTest extends ObjectStoreTestCase {
|
2015-09-28 10:38:01 -04:00
|
|
|
/**
|
2025-06-30 10:56:59 -04:00
|
|
|
* @return IObjectStore
|
2015-09-28 10:38:01 -04:00
|
|
|
*/
|
2016-08-08 09:13:44 -04:00
|
|
|
protected function getInstance() {
|
2025-06-12 12:31:58 -04:00
|
|
|
$config = Server::get(IConfig::class)->getSystemValue('objectstore');
|
2016-08-08 09:13:44 -04:00
|
|
|
if (!is_array($config) || $config['class'] !== 'OC\\Files\\ObjectStore\\Swift') {
|
|
|
|
|
$this->markTestSkipped('objectstore not configured for swift');
|
2014-06-27 06:14:31 -04:00
|
|
|
}
|
2014-09-08 06:53:42 -04:00
|
|
|
|
2016-08-08 09:13:44 -04:00
|
|
|
return new Swift($config['arguments']);
|
2014-09-08 06:53:42 -04:00
|
|
|
}
|
2023-10-28 19:16:46 -04:00
|
|
|
|
2024-09-15 16:32:31 -04:00
|
|
|
public function testFseekSize(): void {
|
2023-10-28 19:16:46 -04:00
|
|
|
$this->markTestSkipped('Swift does not support seeking at the moment');
|
|
|
|
|
}
|
2014-06-13 07:27:02 -04:00
|
|
|
}
|