Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
Kirill Smelkov
jacobsa-fuse
Commits
03563683
Commit
03563683
authored
Feb 29, 2016
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to a test that can pass on OS X, too.
It appears osxfuse is happy to mount over a non-empty directory.
parent
8b7833ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
mount_test.go
mount_test.go
+4
-10
No files found.
mount_test.go
View file @
03563683
...
@@ -65,7 +65,7 @@ func TestSuccessfulMount(t *testing.T) {
...
@@ -65,7 +65,7 @@ func TestSuccessfulMount(t *testing.T) {
defer
fuse
.
Unmount
(
mfs
.
Dir
())
defer
fuse
.
Unmount
(
mfs
.
Dir
())
}
}
func
TestNon
Empty
MountPoint
(
t
*
testing
.
T
)
{
func
TestNon
existent
MountPoint
(
t
*
testing
.
T
)
{
ctx
:=
context
.
Background
()
ctx
:=
context
.
Background
()
// Set up a temporary directory.
// Set up a temporary directory.
...
@@ -76,16 +76,10 @@ func TestNonEmptyMountPoint(t *testing.T) {
...
@@ -76,16 +76,10 @@ func TestNonEmptyMountPoint(t *testing.T) {
defer
os
.
RemoveAll
(
dir
)
defer
os
.
RemoveAll
(
dir
)
// Add a file within it.
// Attempt to mount into a sub-directory that doesn't exist.
err
=
ioutil
.
WriteFile
(
path
.
Join
(
dir
,
"foo"
),
[]
byte
{},
0600
)
if
err
!=
nil
{
t
.
Fatalf
(
"ioutil.WriteFile: %v"
,
err
)
}
// Attempt to mount.
fs
:=
&
minimalFS
{}
fs
:=
&
minimalFS
{}
mfs
,
err
:=
fuse
.
Mount
(
mfs
,
err
:=
fuse
.
Mount
(
dir
,
path
.
Join
(
dir
,
"foo"
)
,
fuseutil
.
NewFileSystemServer
(
fs
),
fuseutil
.
NewFileSystemServer
(
fs
),
&
fuse
.
MountConfig
{})
&
fuse
.
MountConfig
{})
...
@@ -95,7 +89,7 @@ func TestNonEmptyMountPoint(t *testing.T) {
...
@@ -95,7 +89,7 @@ func TestNonEmptyMountPoint(t *testing.T) {
t
.
Fatal
(
"fuse.Mount returned nil"
)
t
.
Fatal
(
"fuse.Mount returned nil"
)
}
}
const
want
=
"no
t empty
"
const
want
=
"no
such file
"
if
got
:=
err
.
Error
();
!
strings
.
Contains
(
got
,
want
)
{
if
got
:=
err
.
Error
();
!
strings
.
Contains
(
got
,
want
)
{
t
.
Errorf
(
"Unexpected error: %v"
,
got
)
t
.
Errorf
(
"Unexpected error: %v"
,
got
)
}
}
...
...
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