Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
426a23cf
Commit
426a23cf
authored
Aug 29, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UnionF: Expand the RemoveAll test.
parent
c7e29df4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+16
-3
No files found.
unionfs/unionfs_test.go
View file @
426a23cf
...
...
@@ -6,6 +6,7 @@ import (
"io/ioutil"
"fmt"
"log"
"path/filepath"
"syscall"
"testing"
"time"
...
...
@@ -158,7 +159,7 @@ func TestSymlinkPromote(t *testing.T) {
err
:=
os
.
Mkdir
(
wd
+
"/ro/subdir"
,
0755
)
CheckSuccess
(
err
)
err
=
os
.
Symlink
(
"/foobar"
,
wd
+
"/mount/subdir/link"
)
CheckSuccess
(
err
)
}
...
...
@@ -645,11 +646,11 @@ func TestRemoveAll(t *testing.T) {
wd
,
clean
:=
setupUfs
(
t
)
defer
clean
()
err
:=
os
.
Mkdir
(
wd
+
"/ro/
dir"
,
0755
)
err
:=
os
.
Mkdir
All
(
wd
+
"/ro/dir/sub
dir"
,
0755
)
CheckSuccess
(
err
)
contents
:=
"hello"
fn
:=
wd
+
"/ro/dir/y"
fn
:=
wd
+
"/ro/dir/
subdir/
y"
err
=
ioutil
.
WriteFile
(
fn
,
[]
byte
(
contents
),
0644
)
CheckSuccess
(
err
)
...
...
@@ -657,6 +658,18 @@ func TestRemoveAll(t *testing.T) {
if
err
!=
nil
{
t
.
Error
(
"Should delete all"
)
}
for
_
,
f
:=
range
[]
string
{
"dir/subdir/y"
,
"dir/subdir"
,
"dir"
}
{
if
fi
,
_
:=
os
.
Lstat
(
filepath
.
Join
(
wd
,
"mount"
,
f
));
fi
!=
nil
{
t
.
Errorf
(
"file %s should have disappeared: %v"
,
f
,
fi
)
}
}
names
,
err
:=
Readdirnames
(
wd
+
"/rw/DELETIONS"
)
CheckSuccess
(
err
)
if
len
(
names
)
!=
3
{
t
.
Fatal
(
"unexpected names"
,
names
)
}
}
func
Readdirnames
(
dir
string
)
([]
string
,
os
.
Error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment