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
df7caed6
Commit
df7caed6
authored
May 09, 2017
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dynamic_fs_test: run goimports and reflow text.
parent
4fc546bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
samples/dynamicfs/dynamic_fs_test.go
samples/dynamicfs/dynamic_fs_test.go
+15
-13
No files found.
samples/dynamicfs/dynamic_fs_test.go
View file @
df7caed6
...
...
@@ -3,19 +3,20 @@ package dynamicfs_test
import
(
"testing"
"github.com/jacobsa/fuse/fusetesting"
"github.com/jacobsa/fuse/samples"
"github.com/jacobsa/fuse/samples/dynamicfs"
"github.com/jacobsa/fuse/fusetesting"
.
"github.com/jacobsa/ogletest"
.
"github.com/jacobsa/oglematchers"
"bytes"
"fmt"
"io/ioutil"
"os"
"path"
"syscall"
"io/ioutil"
"fmt"
"time"
"bytes"
.
"github.com/jacobsa/oglematchers"
.
"github.com/jacobsa/ogletest"
)
func
TestDynamicFS
(
t
*
testing
.
T
)
{
RunTests
(
t
)
}
...
...
@@ -135,8 +136,9 @@ func (t *DynamicFSTest) ReadFile_AgeUnchangedForHandle() {
file
,
err
=
os
.
Open
(
path
.
Join
(
t
.
Dir
,
"age"
))
AssertEq
(
nil
,
err
)
// Ensure that all reads from the same handle return the contents created at file open time.
func
(
file
*
os
.
File
)
{
// Ensure that all reads from the same handle return the contents created at
// file open time.
func
(
file
*
os
.
File
)
{
defer
file
.
Close
()
var
expectedContents
string
...
...
@@ -150,8 +152,8 @@ func (t *DynamicFSTest) ReadFile_AgeUnchangedForHandle() {
ExpectEq
(
expectedContents
,
buffer
.
String
())
t
.
Clock
.
SetTime
(
gCreateTime
.
Add
(
1000
*
time
.
Second
))
// Seek back to the beginning of the file. The contents should be unchanged
for the life of the
// file handle.
// Seek back to the beginning of the file. The contents should be unchanged
// f
or the life of the f
ile handle.
_
,
err
=
file
.
Seek
(
0
,
0
)
AssertEq
(
nil
,
err
)
...
...
@@ -162,11 +164,11 @@ func (t *DynamicFSTest) ReadFile_AgeUnchangedForHandle() {
ExpectEq
(
expectedContents
,
buffer
.
String
())
}(
file
)
// The clock was advanced while the old handle was open. The content change
should be reflected
// by the new handle.
// The clock was advanced while the old handle was open. The content change
//
should be reflected
by the new handle.
file
,
err
=
os
.
Open
(
path
.
Join
(
t
.
Dir
,
"age"
))
AssertEq
(
nil
,
err
)
func
(
file
*
os
.
File
)
{
func
(
file
*
os
.
File
)
{
defer
file
.
Close
()
expectedContents
:=
"This filesystem is 1000 seconds old."
...
...
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