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
954bbbc5
Commit
954bbbc5
authored
Apr 03, 2023
by
Han-Wen Nienhuys
Committed by
Han-Wen Nienhuys
Apr 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs: use testing.TempDir
Change-Id: Ia0d7293d14bb4fdac9be913ba6bd92b836636070
parent
ba08cb01
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
23 deletions
+5
-23
fs/forget_test.go
fs/forget_test.go
+1
-5
fs/windows_test.go
fs/windows_test.go
+2
-10
fs/zip_test.go
fs/zip_test.go
+2
-8
No files found.
fs/forget_test.go
View file @
954bbbc5
...
@@ -79,11 +79,7 @@ func TestForget(t *testing.T) {
...
@@ -79,11 +79,7 @@ func TestForget(t *testing.T) {
EntryTimeout
:
&
sec
,
EntryTimeout
:
&
sec
,
}
}
options
.
Debug
=
testutil
.
VerboseTest
()
options
.
Debug
=
testutil
.
VerboseTest
()
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"TestForget"
)
dir
:=
t
.
TempDir
()
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
defer
os
.
RemoveAll
(
dir
)
rawFS
:=
NewNodeFS
(
root
,
options
)
rawFS
:=
NewNodeFS
(
root
,
options
)
server
,
err
:=
fuse
.
NewServer
(
rawFS
,
dir
,
&
options
.
MountOptions
)
server
,
err
:=
fuse
.
NewServer
(
rawFS
,
dir
,
&
options
.
MountOptions
)
...
...
fs/windows_test.go
View file @
954bbbc5
...
@@ -17,16 +17,8 @@ import (
...
@@ -17,16 +17,8 @@ import (
)
)
func
TestWindowsEmulations
(
t
*
testing
.
T
)
{
func
TestWindowsEmulations
(
t
*
testing
.
T
)
{
mntDir
,
err
:=
ioutil
.
TempDir
(
""
,
"ZipFS"
)
mntDir
:=
t
.
TempDir
()
if
err
!=
nil
{
origDir
:=
t
.
TempDir
()
t
.
Fatal
(
err
)
}
defer
os
.
RemoveAll
(
mntDir
)
origDir
,
err
:=
ioutil
.
TempDir
(
""
,
"ZipFS"
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
defer
os
.
RemoveAll
(
origDir
)
rootData
:=
&
fs
.
LoopbackRoot
{
rootData
:=
&
fs
.
LoopbackRoot
{
NewNode
:
newWindowsNode
,
NewNode
:
newWindowsNode
,
...
...
fs/zip_test.go
View file @
954bbbc5
...
@@ -59,10 +59,7 @@ func TestZipFS(t *testing.T) {
...
@@ -59,10 +59,7 @@ func TestZipFS(t *testing.T) {
}
}
root
:=
&
zipRoot
{
zr
:
r
}
root
:=
&
zipRoot
{
zr
:
r
}
mntDir
,
err
:=
ioutil
.
TempDir
(
""
,
"ZipFS"
)
mntDir
:=
t
.
TempDir
()
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
server
,
err
:=
fs
.
Mount
(
mntDir
,
root
,
nil
)
server
,
err
:=
fs
.
Mount
(
mntDir
,
root
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
...
@@ -108,10 +105,7 @@ func TestZipFSOnAdd(t *testing.T) {
...
@@ -108,10 +105,7 @@ func TestZipFSOnAdd(t *testing.T) {
zr
:=
&
zipRoot
{
zr
:
r
}
zr
:=
&
zipRoot
{
zr
:
r
}
root
:=
&
fs
.
Inode
{}
root
:=
&
fs
.
Inode
{}
mnt
,
err
:=
ioutil
.
TempDir
(
""
,
"ZipFS"
)
mnt
:=
t
.
TempDir
()
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
server
,
err
:=
fs
.
Mount
(
mnt
,
root
,
&
fs
.
Options
{
server
,
err
:=
fs
.
Mount
(
mnt
,
root
,
&
fs
.
Options
{
OnAdd
:
func
(
ctx
context
.
Context
)
{
OnAdd
:
func
(
ctx
context
.
Context
)
{
root
.
AddChild
(
"sub"
,
root
.
AddChild
(
"sub"
,
...
...
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