Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
This commit is contained in:
parent
48f9e4ed03
commit
c2d88a08b7
|
@ -90,13 +90,10 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
|
||||||
$container->query('OCA\Files_External\Lib\Backend\Google'),
|
$container->query('OCA\Files_External\Lib\Backend\Google'),
|
||||||
$container->query('OCA\Files_External\Lib\Backend\Swift'),
|
$container->query('OCA\Files_External\Lib\Backend\Swift'),
|
||||||
$container->query('OCA\Files_External\Lib\Backend\SFTP_Key'),
|
$container->query('OCA\Files_External\Lib\Backend\SFTP_Key'),
|
||||||
|
$container->query('OCA\Files_External\Lib\Backend\SMB'),
|
||||||
|
$container->query('OCA\Files_External\Lib\Backend\SMB_OC'),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!\OC_Util::runningOnWindows()) {
|
|
||||||
$backends[] = $container->query('OCA\Files_External\Lib\Backend\SMB');
|
|
||||||
$backends[] = $container->query('OCA\Files_External\Lib\Backend\SMB_OC');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $backends;
|
return $backends;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ try {
|
||||||
|
|
||||||
set_exception_handler('exceptionHandler');
|
set_exception_handler('exceptionHandler');
|
||||||
|
|
||||||
if (!OC_Util::runningOnWindows()) {
|
|
||||||
if (!function_exists('posix_getuid')) {
|
if (!function_exists('posix_getuid')) {
|
||||||
echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
|
echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -73,7 +72,6 @@ try {
|
||||||
echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
|
echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$oldWorkingDir = getcwd();
|
$oldWorkingDir = getcwd();
|
||||||
if ($oldWorkingDir === false) {
|
if ($oldWorkingDir === false) {
|
||||||
|
|
2
cron.php
2
cron.php
|
@ -84,7 +84,6 @@ try {
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
// the cron job must be executed with the right user
|
// the cron job must be executed with the right user
|
||||||
if (!OC_Util::runningOnWindows()) {
|
|
||||||
if (!function_exists('posix_getuid')) {
|
if (!function_exists('posix_getuid')) {
|
||||||
echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
|
echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -97,7 +96,6 @@ try {
|
||||||
echo "Web server user: " . $configUser['name'] . PHP_EOL;
|
echo "Web server user: " . $configUser['name'] . PHP_EOL;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// We call ownCloud from the CLI (aka cron)
|
// We call ownCloud from the CLI (aka cron)
|
||||||
if ($appMode != 'cron') {
|
if ($appMode != 'cron') {
|
||||||
|
|
|
@ -489,26 +489,8 @@ abstract class Common implements Storage, ILockingStorage {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: $path will remain unverified for now
|
// NOTE: $path will remain unverified for now
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->verifyWindowsPath($fileName);
|
|
||||||
} else {
|
|
||||||
$this->verifyPosixPath($fileName);
|
$this->verifyPosixPath($fileName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
|
|
||||||
* @param string $fileName
|
|
||||||
* @throws InvalidPathException
|
|
||||||
*/
|
|
||||||
protected function verifyWindowsPath($fileName) {
|
|
||||||
$fileName = trim($fileName);
|
|
||||||
$this->scanForInvalidCharacters($fileName, "\\/<>:\"|?*");
|
|
||||||
$reservedNames = ['CON', 'PRN', 'AUX', 'NUL', 'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9'];
|
|
||||||
if (in_array(strtoupper($fileName), $reservedNames)) {
|
|
||||||
throw new ReservedWordException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $fileName
|
* @param string $fileName
|
||||||
|
|
|
@ -299,8 +299,7 @@ class PreviewManager implements IPreview {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($checkImagick->queryFormats('PDF')) === 1) {
|
if (count($checkImagick->queryFormats('PDF')) === 1) {
|
||||||
// Office previews are currently not supported on Windows
|
if (\OC_Helper::is_function_enabled('shell_exec')) {
|
||||||
if (!\OC_Util::runningOnWindows() && \OC_Helper::is_function_enabled('shell_exec')) {
|
|
||||||
$officeFound = is_string($this->config->getSystemValue('preview_libreoffice_path', null));
|
$officeFound = is_string($this->config->getSystemValue('preview_libreoffice_path', null));
|
||||||
|
|
||||||
if (!$officeFound) {
|
if (!$officeFound) {
|
||||||
|
@ -324,9 +323,8 @@ class PreviewManager implements IPreview {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video requires avconv or ffmpeg and is therefor
|
// Video requires avconv or ffmpeg
|
||||||
// currently not supported on Windows.
|
if (in_array('OC\Preview\Movie', $this->getEnabledDefaultProvider())) {
|
||||||
if (in_array('OC\Preview\Movie', $this->getEnabledDefaultProvider()) && !\OC_Util::runningOnWindows()) {
|
|
||||||
$avconvBinary = \OC_Helper::findBinaryPath('avconv');
|
$avconvBinary = \OC_Helper::findBinaryPath('avconv');
|
||||||
$ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg');
|
$ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg');
|
||||||
|
|
||||||
|
|
|
@ -305,10 +305,6 @@ class Setup {
|
||||||
$trustedDomains = [$request->getInsecureServerHost()];
|
$trustedDomains = [$request->getInsecureServerHost()];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$dataDir = rtrim(realpath($dataDir), '\\');
|
|
||||||
}
|
|
||||||
|
|
||||||
//use sqlite3 when available, otherwise sqlite2 will be used.
|
//use sqlite3 when available, otherwise sqlite2 will be used.
|
||||||
if($dbType=='sqlite' and class_exists('SQLite3')) {
|
if($dbType=='sqlite' and class_exists('SQLite3')) {
|
||||||
$dbType='sqlite3';
|
$dbType='sqlite3';
|
||||||
|
|
|
@ -534,7 +534,7 @@ class OC_Helper {
|
||||||
return $memcache->get($program);
|
return $memcache->get($program);
|
||||||
}
|
}
|
||||||
$result = null;
|
$result = null;
|
||||||
if (!\OC_Util::runningOnWindows() && self::is_function_enabled('exec')) {
|
if (self::is_function_enabled('exec')) {
|
||||||
$exeSniffer = new ExecutableFinder();
|
$exeSniffer = new ExecutableFinder();
|
||||||
// Returns null if nothing is found
|
// Returns null if nothing is found
|
||||||
$result = $exeSniffer->find($program);
|
$result = $exeSniffer->find($program);
|
||||||
|
|
|
@ -902,9 +902,6 @@ class OC_Util {
|
||||||
public static function checkDataDirectoryPermissions($dataDirectory) {
|
public static function checkDataDirectoryPermissions($dataDirectory) {
|
||||||
$l = \OC::$server->getL10N('lib');
|
$l = \OC::$server->getL10N('lib');
|
||||||
$errors = array();
|
$errors = array();
|
||||||
if (self::runningOnWindows()) {
|
|
||||||
//TODO: permissions checks for windows hosts
|
|
||||||
} else {
|
|
||||||
$permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
|
$permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
|
||||||
. ' cannot be listed by other users.');
|
. ' cannot be listed by other users.');
|
||||||
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
|
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
|
||||||
|
@ -919,7 +916,6 @@ class OC_Util {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -933,7 +929,7 @@ class OC_Util {
|
||||||
public static function checkDataDirectoryValidity($dataDirectory) {
|
public static function checkDataDirectoryValidity($dataDirectory) {
|
||||||
$l = \OC::$server->getL10N('lib');
|
$l = \OC::$server->getL10N('lib');
|
||||||
$errors = [];
|
$errors = [];
|
||||||
if (!self::runningOnWindows() && $dataDirectory[0] !== '/') {
|
if ($dataDirectory[0] !== '/') {
|
||||||
$errors[] = [
|
$errors[] = [
|
||||||
'error' => $l->t('Data directory (%s) must be an absolute path', [$dataDirectory]),
|
'error' => $l->t('Data directory (%s) must be an absolute path', [$dataDirectory]),
|
||||||
'hint' => $l->t('Check the value of "datadirectory" in your configuration')
|
'hint' => $l->t('Check the value of "datadirectory" in your configuration')
|
||||||
|
@ -1203,11 +1199,6 @@ class OC_Util {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function isSetLocaleWorking() {
|
public static function isSetLocaleWorking() {
|
||||||
// setlocale test is pointless on Windows
|
|
||||||
if (OC_Util::runningOnWindows()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
\Patchwork\Utf8\Bootup::initLocale();
|
\Patchwork\Utf8\Bootup::initLocale();
|
||||||
if ('' === basename('§')) {
|
if ('' === basename('§')) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -154,9 +154,6 @@ $template->assign('cronErrors', $appConfig->getValue('core', 'cronErrors'));
|
||||||
$path = getenv('PATH');
|
$path = getenv('PATH');
|
||||||
$template->assign('getenvServerNotWorking', empty($path));
|
$template->assign('getenvServerNotWorking', empty($path));
|
||||||
|
|
||||||
// warn if Windows is used
|
|
||||||
$template->assign('WindowsWarning', OC_Util::runningOnWindows());
|
|
||||||
|
|
||||||
// warn if outdated version of a memcache module is used
|
// warn if outdated version of a memcache module is used
|
||||||
$caches = [
|
$caches = [
|
||||||
'apcu' => ['name' => $l->t('APCu'), 'version' => '4.0.6'],
|
'apcu' => ['name' => $l->t('APCu'), 'version' => '4.0.6'],
|
||||||
|
|
|
@ -106,15 +106,6 @@ if ($_['invalidTransactionIsolationLevel']) {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows Warning
|
|
||||||
if ($_['WindowsWarning']) {
|
|
||||||
?>
|
|
||||||
<li>
|
|
||||||
<?php p($l->t('Your server is running on Microsoft Windows. We highly recommend Linux for optimal user experience.')); ?>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Warning if memcache is outdated
|
// Warning if memcache is outdated
|
||||||
foreach ($_['OutdatedCacheWarning'] as $php_module => $data) {
|
foreach ($_['OutdatedCacheWarning'] as $php_module => $data) {
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -12,14 +12,6 @@ namespace Test\Archive;
|
||||||
use OC\Archive\TAR;
|
use OC\Archive\TAR;
|
||||||
|
|
||||||
class TARTest extends TestBase {
|
class TARTest extends TestBase {
|
||||||
protected function setUp() {
|
|
||||||
parent::setUp();
|
|
||||||
|
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] tar archives are not supported on Windows');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getExisting() {
|
protected function getExisting() {
|
||||||
$dir = \OC::$SERVERROOT . '/tests/data';
|
$dir = \OC::$SERVERROOT . '/tests/data';
|
||||||
return new TAR($dir . '/data.tar.gz');
|
return new TAR($dir . '/data.tar.gz');
|
||||||
|
|
|
@ -12,14 +12,6 @@ namespace Test\Archive;
|
||||||
use OC\Archive\ZIP;
|
use OC\Archive\ZIP;
|
||||||
|
|
||||||
class ZIPTest extends TestBase {
|
class ZIPTest extends TestBase {
|
||||||
protected function setUp() {
|
|
||||||
parent::setUp();
|
|
||||||
|
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] ');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getExisting() {
|
protected function getExisting() {
|
||||||
$dir = \OC::$SERVERROOT . '/tests/data';
|
$dir = \OC::$SERVERROOT . '/tests/data';
|
||||||
return new ZIP($dir . '/data.zip');
|
return new ZIP($dir . '/data.zip');
|
||||||
|
|
|
@ -272,28 +272,6 @@ class FilesystemTest extends \Test\TestCase {
|
||||||
$this->assertSame($expected, \OC\Files\Filesystem::isFileBlacklisted($path));
|
$this->assertSame($expected, \OC\Files\Filesystem::isFileBlacklisted($path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function normalizePathWindowsAbsolutePathData() {
|
|
||||||
return array(
|
|
||||||
array('C:/', 'C:\\'),
|
|
||||||
array('C:/', 'C:\\', false),
|
|
||||||
array('C:/tests', 'C:\\tests'),
|
|
||||||
array('C:/tests', 'C:\\tests', false),
|
|
||||||
array('C:/tests', 'C:\\tests\\'),
|
|
||||||
array('C:/tests/', 'C:\\tests\\', false),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider normalizePathWindowsAbsolutePathData
|
|
||||||
*/
|
|
||||||
public function testNormalizePathWindowsAbsolutePath($expected, $path, $stripTrailingSlash = true) {
|
|
||||||
if (!\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('This test is Windows only');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->assertEquals($expected, \OC\Files\Filesystem::normalizePath($path, $stripTrailingSlash, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNormalizePathUTF8() {
|
public function testNormalizePathUTF8() {
|
||||||
if (!class_exists('Patchwork\PHP\Shim\Normalizer')) {
|
if (!class_exists('Patchwork\PHP\Shim\Normalizer')) {
|
||||||
$this->markTestSkipped('UTF8 normalizer Patchwork was not found');
|
$this->markTestSkipped('UTF8 normalizer Patchwork was not found');
|
||||||
|
|
|
@ -48,10 +48,6 @@ class LocalTest extends Storage {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStableEtag() {
|
public function testStableEtag() {
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] On Windows platform we have no stable etag generation - yet');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->instance->file_put_contents('test.txt', 'foobar');
|
$this->instance->file_put_contents('test.txt', 'foobar');
|
||||||
$etag1 = $this->instance->getETag('test.txt');
|
$etag1 = $this->instance->getETag('test.txt');
|
||||||
$etag2 = $this->instance->getETag('test.txt');
|
$etag2 = $this->instance->getETag('test.txt');
|
||||||
|
@ -59,10 +55,6 @@ class LocalTest extends Storage {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEtagChange() {
|
public function testEtagChange() {
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] On Windows platform we have no stable etag generation - yet');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->instance->file_put_contents('test.txt', 'foo');
|
$this->instance->file_put_contents('test.txt', 'foo');
|
||||||
$this->instance->touch('test.txt', time() - 2);
|
$this->instance->touch('test.txt', time() - 2);
|
||||||
$etag1 = $this->instance->getETag('test.txt');
|
$etag1 = $this->instance->getETag('test.txt');
|
||||||
|
|
|
@ -80,10 +80,6 @@ class DetectionTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDetectString() {
|
public function testDetectString() {
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] Strings have mimetype application/octet-stream on Windows');
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $this->detection->detectString("/data/data.tar.gz");
|
$result = $this->detection->detectString("/data/data.tar.gz");
|
||||||
$expected = 'text/plain; charset=us-ascii';
|
$expected = 'text/plain; charset=us-ascii';
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
|
|
|
@ -104,7 +104,7 @@ class ViewTest extends \Test\TestCase {
|
||||||
$cache->clear();
|
$cache->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->tempStorage && !\OC_Util::runningOnWindows()) {
|
if ($this->tempStorage) {
|
||||||
system('rm -rf ' . escapeshellarg($this->tempStorage->getDataDir()));
|
system('rm -rf ' . escapeshellarg($this->tempStorage->getDataDir()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,14 +761,10 @@ class ViewTest extends \Test\TestCase {
|
||||||
/*
|
/*
|
||||||
* 4096 is the maximum path length in file_cache.path in *nix
|
* 4096 is the maximum path length in file_cache.path in *nix
|
||||||
* 1024 is the max path length in mac
|
* 1024 is the max path length in mac
|
||||||
* 228 is the max path length in windows
|
|
||||||
*/
|
*/
|
||||||
$folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789';
|
$folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789';
|
||||||
$tmpdirLength = strlen(\OC::$server->getTempManager()->getTemporaryFolder());
|
$tmpdirLength = strlen(\OC::$server->getTempManager()->getTemporaryFolder());
|
||||||
if (\OC_Util::runningOnWindows()) {
|
if (\OC_Util::runningOnMac()) {
|
||||||
$this->markTestSkipped('[Windows] ');
|
|
||||||
$depth = ((260 - $tmpdirLength) / 57);
|
|
||||||
} elseif (\OC_Util::runningOnMac()) {
|
|
||||||
$depth = ((1024 - $tmpdirLength) / 57);
|
$depth = ((1024 - $tmpdirLength) / 57);
|
||||||
} else {
|
} else {
|
||||||
$depth = ((4000 - $tmpdirLength) / 57);
|
$depth = ((4000 - $tmpdirLength) / 57);
|
||||||
|
|
|
@ -75,10 +75,6 @@ class ImageTest extends \Test\TestCase {
|
||||||
$img = new \OC_Image(null);
|
$img = new \OC_Image(null);
|
||||||
$this->assertEquals('', $img->mimeType());
|
$this->assertEquals('', $img->mimeType());
|
||||||
|
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] Images created with imagecreate() are pngs on windows');
|
|
||||||
}
|
|
||||||
|
|
||||||
$img = new \OC_Image(file_get_contents(OC::$SERVERROOT.'/tests/data/testimage.jpg'));
|
$img = new \OC_Image(file_get_contents(OC::$SERVERROOT.'/tests/data/testimage.jpg'));
|
||||||
$this->assertEquals('image/jpeg', $img->mimeType());
|
$this->assertEquals('image/jpeg', $img->mimeType());
|
||||||
|
|
||||||
|
|
|
@ -28,12 +28,10 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
|
||||||
public function dataFileNameProvider() {
|
public function dataFileNameProvider() {
|
||||||
$path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR;
|
$path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
$filePaths = array(array($path . 'lorem.txt', 446));
|
return [
|
||||||
if (!\OC_Util::runningOnWindows()) {
|
[ $path . 'lorem.txt', 446 ],
|
||||||
$filePaths[] = array($path . 'strängé filename (duplicate #2).txt', 446);
|
[ $path . 'strängé filename (duplicate #2).txt', 446 ],
|
||||||
}
|
];
|
||||||
|
|
||||||
return $filePaths;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -138,9 +138,6 @@ class TempManagerTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLogCantCreateFile() {
|
public function testLogCantCreateFile() {
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] chmod() does not work as intended on Windows.');
|
|
||||||
}
|
|
||||||
$this->markTestSkipped('TODO: Disable because fails on drone');
|
$this->markTestSkipped('TODO: Disable because fails on drone');
|
||||||
|
|
||||||
$logger = $this->getMock('\Test\NullLogger');
|
$logger = $this->getMock('\Test\NullLogger');
|
||||||
|
@ -153,9 +150,6 @@ class TempManagerTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLogCantCreateFolder() {
|
public function testLogCantCreateFolder() {
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] chmod() does not work as intended on Windows.');
|
|
||||||
}
|
|
||||||
$this->markTestSkipped('TODO: Disable because fails on drone');
|
$this->markTestSkipped('TODO: Disable because fails on drone');
|
||||||
|
|
||||||
$logger = $this->getMock('\Test\NullLogger');
|
$logger = $this->getMock('\Test\NullLogger');
|
||||||
|
|
|
@ -145,9 +145,6 @@ class UtilCheckServerTest extends \Test\TestCase {
|
||||||
* Tests an error is given when the datadir is not writable
|
* Tests an error is given when the datadir is not writable
|
||||||
*/
|
*/
|
||||||
public function testDataDirNotWritable() {
|
public function testDataDirNotWritable() {
|
||||||
if (\OC_Util::runningOnWindows()) {
|
|
||||||
$this->markTestSkipped('[Windows] chmod() does not work as intended on Windows.');
|
|
||||||
}
|
|
||||||
$this->markTestSkipped('TODO: Disable because fails on drone');
|
$this->markTestSkipped('TODO: Disable because fails on drone');
|
||||||
|
|
||||||
chmod($this->datadir, 0300);
|
chmod($this->datadir, 0300);
|
||||||
|
|
|
@ -396,11 +396,9 @@ class UtilTest extends \Test\TestCase {
|
||||||
$this->assertNotEmpty($errors);
|
$this->assertNotEmpty($errors);
|
||||||
\OCP\Files::rmdirr($dataDir);
|
\OCP\Files::rmdirr($dataDir);
|
||||||
|
|
||||||
if (!\OC_Util::runningOnWindows()) {
|
|
||||||
$errors = \OC_Util::checkDataDirectoryValidity('relative/path');
|
$errors = \OC_Util::checkDataDirectoryValidity('relative/path');
|
||||||
$this->assertNotEmpty($errors);
|
$this->assertNotEmpty($errors);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected function setUp() {
|
protected function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
Loading…
Reference in New Issue