From 0135904f7d3e1c0e763adaefe267c736616e3d26 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 16 Nov 2016 19:28:52 -0500 Subject: Upgrading server dependancies (#4566) --- vendor/golang.org/x/net/webdav/prop_test.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'vendor/golang.org/x/net/webdav/prop_test.go') diff --git a/vendor/golang.org/x/net/webdav/prop_test.go b/vendor/golang.org/x/net/webdav/prop_test.go index 0834dc9f1..57d0e826f 100644 --- a/vendor/golang.org/x/net/webdav/prop_test.go +++ b/vendor/golang.org/x/net/webdav/prop_test.go @@ -12,13 +12,16 @@ import ( "reflect" "sort" "testing" + + "golang.org/x/net/context" ) func TestMemPS(t *testing.T) { + ctx := context.Background() // calcProps calculates the getlastmodified and getetag DAV: property // values in pstats for resource name in file-system fs. calcProps := func(name string, fs FileSystem, ls LockSystem, pstats []Propstat) error { - fi, err := fs.Stat(name) + fi, err := fs.Stat(ctx, name) if err != nil { return err } @@ -32,7 +35,7 @@ func TestMemPS(t *testing.T) { if fi.IsDir() { continue } - etag, err := findETag(fs, ls, name, fi) + etag, err := findETag(ctx, fs, ls, name, fi) if err != nil { return err } @@ -519,7 +522,7 @@ func TestMemPS(t *testing.T) { var propstats []Propstat switch op.op { case "propname": - pnames, err := propnames(fs, ls, op.name) + pnames, err := propnames(ctx, fs, ls, op.name) if err != nil { t.Errorf("%s: got error %v, want nil", desc, err) continue @@ -531,11 +534,11 @@ func TestMemPS(t *testing.T) { } continue case "allprop": - propstats, err = allprop(fs, ls, op.name, op.pnames) + propstats, err = allprop(ctx, fs, ls, op.name, op.pnames) case "propfind": - propstats, err = props(fs, ls, op.name, op.pnames) + propstats, err = props(ctx, fs, ls, op.name, op.pnames) case "proppatch": - propstats, err = patch(fs, ls, op.name, op.patches) + propstats, err = patch(ctx, fs, ls, op.name, op.patches) default: t.Fatalf("%s: %s not implemented", desc, op.op) } @@ -588,8 +591,8 @@ type noDeadPropsFS struct { FileSystem } -func (fs noDeadPropsFS) OpenFile(name string, flag int, perm os.FileMode) (File, error) { - f, err := fs.FileSystem.OpenFile(name, flag, perm) +func (fs noDeadPropsFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) { + f, err := fs.FileSystem.OpenFile(ctx, name, flag, perm) if err != nil { return nil, err } -- cgit v1.2.3-1-g7c22