Pass along the test context to the server.

geesefs-0-30-9
Aaron Jacobs 2015-05-01 11:20:43 +10:00
parent 91346a5af6
commit f52a6099c6
1 changed files with 7 additions and 1 deletions

View File

@ -70,9 +70,15 @@ func (t *SampleTest) initialize(
ctx context.Context,
server fuse.Server,
config *fuse.MountConfig) (err error) {
// Initialize the context.
// Initialize the context used by the test.
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.
t.Clock.SetTime(time.Date(2012, 8, 15, 22, 56, 0, 0, time.Local))