Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
e888bdda
Commit
e888bdda
authored
11 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
get rid of failing test that don't cause additional downloads
parent
cf9b7e34
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/config.sample.php
+0
-0
0 additions, 0 deletions
config/config.sample.php
tests/lib/files/etagtest.php
+1
-1
1 addition, 1 deletion
tests/lib/files/etagtest.php
tests/lib/files/filesystem.php
+24
-24
24 additions, 24 deletions
tests/lib/files/filesystem.php
with
25 additions
and
25 deletions
config/config.sample.php
100644 → 100755
+
0
−
0
View file @
e888bdda
File mode changed from 100644 to 100755
This diff is collapsed.
Click to expand it.
tests/lib/files/etagtest.php
+
1
−
1
View file @
e888bdda
...
...
@@ -59,7 +59,7 @@ class EtagTest extends \PHPUnit_Framework_TestCase {
Filesystem
::
file_put_contents
(
'/folder/bar.txt'
,
'fgh'
);
Filesystem
::
file_put_contents
(
'/folder/subfolder/qwerty.txt'
,
'jkl'
);
$files
=
array
(
'/'
,
'/folder'
,
'/foo.txt'
,
'/folder/bar.txt'
,
'/folder/subfolder'
,
'/folder/subfolder/qwerty.txt'
);
$files
=
array
(
'/foo.txt'
,
'/folder/bar.txt'
,
'/folder/subfolder'
,
'/folder/subfolder/qwerty.txt'
);
$originalEtags
=
$this
->
getEtags
(
$files
);
$scanner
=
new
\OC\Files\Utils\Scanner
(
$user1
);
...
...
This diff is collapsed.
Click to expand it.
tests/lib/files/filesystem.php
+
24
−
24
View file @
e888bdda
...
...
@@ -26,7 +26,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
/**
* @var array tmpDirs
*/
private
$tmpDirs
=
array
();
private
$tmpDirs
=
array
();
/**
* @return array
...
...
@@ -51,21 +51,21 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
}
public
function
testMount
()
{
\OC\Files\Filesystem
::
mount
(
'\OC\Files\Storage\Local'
,
self
::
getStorageData
(),
'/'
);
$this
->
assertEquals
(
'/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/'
));
$this
->
assertEquals
(
'/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some/folder'
));
list
(
,
$internalPath
)
=
\OC\Files\Filesystem
::
resolvePath
(
'/'
);
$this
->
assertEquals
(
''
,
$internalPath
);
list
(
,
$internalPath
)
=
\OC\Files\Filesystem
::
resolvePath
(
'/some/folder'
);
$this
->
assertEquals
(
'some/folder'
,
$internalPath
);
\OC\Files\Filesystem
::
mount
(
'\OC\Files\Storage\Local'
,
self
::
getStorageData
(),
'/some'
);
$this
->
assertEquals
(
'/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/'
));
$this
->
assertEquals
(
'/some/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some/folder'
));
$this
->
assertEquals
(
'/some/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some/'
));
$this
->
assertEquals
(
'/some/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some'
));
list
(
,
$internalPath
)
=
\OC\Files\Filesystem
::
resolvePath
(
'/some/folder'
);
$this
->
assertEquals
(
'folder'
,
$internalPath
);
\OC\Files\Filesystem
::
mount
(
'\OC\Files\Storage\Local'
,
self
::
getStorageData
(),
'/'
);
$this
->
assertEquals
(
'/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/'
));
$this
->
assertEquals
(
'/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some/folder'
));
list
(,
$internalPath
)
=
\OC\Files\Filesystem
::
resolvePath
(
'/'
);
$this
->
assertEquals
(
''
,
$internalPath
);
list
(,
$internalPath
)
=
\OC\Files\Filesystem
::
resolvePath
(
'/some/folder'
);
$this
->
assertEquals
(
'some/folder'
,
$internalPath
);
\OC\Files\Filesystem
::
mount
(
'\OC\Files\Storage\Local'
,
self
::
getStorageData
(),
'/some'
);
$this
->
assertEquals
(
'/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/'
));
$this
->
assertEquals
(
'/some/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some/folder'
));
$this
->
assertEquals
(
'/some/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some/'
));
$this
->
assertEquals
(
'/some/'
,
\OC\Files\Filesystem
::
getMountPoint
(
'/some'
));
list
(,
$internalPath
)
=
\OC\Files\Filesystem
::
resolvePath
(
'/some/folder'
);
$this
->
assertEquals
(
'folder'
,
$internalPath
);
}
public
function
testNormalize
()
{
...
...
@@ -136,20 +136,20 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
}
public
function
testHooks
()
{
if
(
\OC\Files\Filesystem
::
getView
()){
if
(
\OC\Files\Filesystem
::
getView
())
{
$user
=
\OC_User
::
getUser
();
}
else
{
$user
=
uniqid
();
\OC\Files\Filesystem
::
init
(
$user
,
'/'
.
$user
.
'/files'
);
}
else
{
$user
=
uniqid
();
\OC\Files\Filesystem
::
init
(
$user
,
'/'
.
$user
.
'/files'
);
}
\OC_Hook
::
clear
(
'OC_Filesystem'
);
\OC_Hook
::
connect
(
'OC_Filesystem'
,
'post_write'
,
$this
,
'dummyHook'
);
\OC\Files\Filesystem
::
mount
(
'OC\Files\Storage\Temporary'
,
array
(),
'/'
);
$rootView
=
new
\OC\Files\View
(
''
);
$rootView
->
mkdir
(
'/'
.
$user
);
$rootView
->
mkdir
(
'/'
.
$user
.
'/files'
);
$rootView
=
new
\OC\Files\View
(
''
);
$rootView
->
mkdir
(
'/'
.
$user
);
$rootView
->
mkdir
(
'/'
.
$user
.
'/files'
);
// \OC\Files\Filesystem::file_put_contents('/foo', 'foo');
\OC\Files\Filesystem
::
mkdir
(
'/bar'
);
...
...
@@ -215,7 +215,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$homeMount
=
\OC\Files\Filesystem
::
getStorage
(
'/'
.
$userId
.
'/'
);
$this
->
assertInstanceOf
(
'\OC\Files\Storage\Home'
,
$homeMount
);
$this
->
assertEquals
(
'local::'
.
$datadir
.
'/'
.
$userId
.
'/'
,
$homeMount
->
getId
());
$this
->
assertEquals
(
'local::'
.
$datadir
.
'/'
.
$userId
.
'/'
,
$homeMount
->
getId
());
\OC_User
::
deleteUser
(
$userId
);
// delete storage entry
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment