From f52a6099c6be89dca4a101d2aa8db8e655f78ddf Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Fri, 1 May 2015 11:20:43 +1000 Subject: [PATCH] Pass along the test context to the server. --- samples/in_process.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/samples/in_process.go b/samples/in_process.go index 4cb8dcf..311b78c 100644 --- a/samples/in_process.go +++ b/samples/in_process.go @@ -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))