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
Kirill Smelkov
go-fuse
Commits
88b9481d
Commit
88b9481d
authored
Feb 02, 2016
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unionfs: remove log spam from the tests.
parent
dffd0318
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
11 deletions
+1
-11
unionfs/autounion_test.go
unionfs/autounion_test.go
+0
-2
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+1
-9
No files found.
unionfs/autounion_test.go
View file @
88b9481d
...
@@ -2,7 +2,6 @@ package unionfs
...
@@ -2,7 +2,6 @@ package unionfs
import
(
import
(
"io/ioutil"
"io/ioutil"
"log"
"os"
"os"
"testing"
"testing"
"time"
"time"
...
@@ -91,7 +90,6 @@ func TestVersion(t *testing.T) {
...
@@ -91,7 +90,6 @@ func TestVersion(t *testing.T) {
if
len
(
c
)
==
0
{
if
len
(
c
)
==
0
{
t
.
Fatal
(
"No version found."
)
t
.
Fatal
(
"No version found."
)
}
}
log
.
Println
(
"Found version:"
,
string
(
c
))
}
}
func
TestAutoFsSymlink
(
t
*
testing
.
T
)
{
func
TestAutoFsSymlink
(
t
*
testing
.
T
)
{
...
...
unionfs/unionfs_test.go
View file @
88b9481d
...
@@ -4,7 +4,6 @@ import (
...
@@ -4,7 +4,6 @@ import (
"bytes"
"bytes"
"fmt"
"fmt"
"io/ioutil"
"io/ioutil"
"log"
"os"
"os"
"os/exec"
"os/exec"
"path/filepath"
"path/filepath"
...
@@ -914,7 +913,6 @@ func ProgramVersion(bin string) (major, minor int64, err error) {
...
@@ -914,7 +913,6 @@ func ProgramVersion(bin string) (major, minor int64, err error) {
matches
:=
regexp
.
MustCompile
(
".* ([0-9]+)
\\
.([0-9]+)"
)
.
FindStringSubmatch
(
lines
[
0
])
matches
:=
regexp
.
MustCompile
(
".* ([0-9]+)
\\
.([0-9]+)"
)
.
FindStringSubmatch
(
lines
[
0
])
if
matches
==
nil
{
if
matches
==
nil
{
log
.
Println
(
"no output"
)
return
0
,
0
,
fmt
.
Errorf
(
"no match for %q"
,
lines
[
0
])
return
0
,
0
,
fmt
.
Errorf
(
"no match for %q"
,
lines
[
0
])
}
}
major
,
err
=
strconv
.
ParseInt
(
matches
[
1
],
10
,
64
)
major
,
err
=
strconv
.
ParseInt
(
matches
[
1
],
10
,
64
)
...
@@ -957,10 +955,8 @@ func TestUnionFsRmRf(t *testing.T) {
...
@@ -957,10 +955,8 @@ func TestUnionFsRmRf(t *testing.T) {
if
maj
<
8
{
// assuming GNU coreutils.
if
maj
<
8
{
// assuming GNU coreutils.
t
.
Skipf
(
"Skipping test; GNU rm %d.%d is not POSIX compliant."
,
maj
,
min
)
t
.
Skipf
(
"Skipping test; GNU rm %d.%d is not POSIX compliant."
,
maj
,
min
)
}
}
command
:=
fmt
.
Sprintf
(
"%s -f %s/mnt/dir"
,
bin
,
wd
)
log
.
Printf
(
"Command: %s"
,
command
)
names
,
_
:=
Readdirnames
(
wd
+
"/mnt/dir"
)
names
,
_
:=
Readdirnames
(
wd
+
"/mnt/dir"
)
log
.
Print
f
(
"Contents of %s/mnt/dir: %s"
,
wd
,
strings
.
Join
(
names
,
", "
))
t
.
Log
f
(
"Contents of %s/mnt/dir: %s"
,
wd
,
strings
.
Join
(
names
,
", "
))
cmd
:=
exec
.
Command
(
bin
,
"-rf"
,
wd
+
"/mnt/dir"
)
cmd
:=
exec
.
Command
(
bin
,
"-rf"
,
wd
+
"/mnt/dir"
)
err
=
cmd
.
Run
()
err
=
cmd
.
Run
()
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -1167,8 +1163,6 @@ func TestUnionFsDisappearing(t *testing.T) {
...
@@ -1167,8 +1163,6 @@ func TestUnionFsDisappearing(t *testing.T) {
state
.
SetDebug
(
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
go
state
.
Serve
()
log
.
Println
(
"TestUnionFsDisappearing2"
)
err
=
ioutil
.
WriteFile
(
wd
+
"/ro/file"
,
[]
byte
(
"blabla"
),
0644
)
err
=
ioutil
.
WriteFile
(
wd
+
"/ro/file"
,
[]
byte
(
"blabla"
),
0644
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"WriteFile failed: %v"
,
err
)
t
.
Fatalf
(
"WriteFile failed: %v"
,
err
)
...
@@ -1187,13 +1181,11 @@ func TestUnionFsDisappearing(t *testing.T) {
...
@@ -1187,13 +1181,11 @@ func TestUnionFsDisappearing(t *testing.T) {
if
err
==
nil
{
if
err
==
nil
{
t
.
Fatal
(
"Readdir should have failed"
)
t
.
Fatal
(
"Readdir should have failed"
)
}
}
log
.
Println
(
"expected readdir failure:"
,
err
)
err
=
ioutil
.
WriteFile
(
wd
+
"/mnt/file2"
,
[]
byte
(
"blabla"
),
0644
)
err
=
ioutil
.
WriteFile
(
wd
+
"/mnt/file2"
,
[]
byte
(
"blabla"
),
0644
)
if
err
==
nil
{
if
err
==
nil
{
t
.
Fatal
(
"write should have failed"
)
t
.
Fatal
(
"write should have failed"
)
}
}
log
.
Println
(
"expected write failure:"
,
err
)
// Restore, and wait for caches to catch up.
// Restore, and wait for caches to catch up.
wrFs
.
visibleChan
<-
true
wrFs
.
visibleChan
<-
true
...
...
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