Pass along the test context to the server.
parent
91346a5af6
commit
f52a6099c6
|
@ -70,9 +70,15 @@ func (t *SampleTest) initialize(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
server fuse.Server,
|
server fuse.Server,
|
||||||
config *fuse.MountConfig) (err error) {
|
config *fuse.MountConfig) (err error) {
|
||||||
// Initialize the context.
|
// Initialize the context used by the test.
|
||||||
t.Ctx = ctx
|
t.Ctx = ctx
|
||||||
|
|
||||||
|
// Make the server share that context, if the test hasn't already set some
|
||||||
|
// other one.
|
||||||
|
if config.OpContext == nil {
|
||||||
|
config.OpContext = ctx
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize the clock.
|
// Initialize the clock.
|
||||||
t.Clock.SetTime(time.Date(2012, 8, 15, 22, 56, 0, 0, time.Local))
|
t.Clock.SetTime(time.Date(2012, 8, 15, 22, 56, 0, 0, time.Local))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue