diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-11-16 19:28:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 19:28:52 -0500 |
commit | 0135904f7d3e1c0e763adaefe267c736616e3d26 (patch) | |
tree | c27be7588f98eaea62e0bd0c0087f2b348da9738 /vendor/golang.org/x/net/webdav/prop_test.go | |
parent | 0b296dd8c2aefefe89787be5cc627d44cf431150 (diff) | |
download | chat-0135904f7d3e1c0e763adaefe267c736616e3d26.tar.gz chat-0135904f7d3e1c0e763adaefe267c736616e3d26.tar.bz2 chat-0135904f7d3e1c0e763adaefe267c736616e3d26.zip |
Upgrading server dependancies (#4566)
Diffstat (limited to 'vendor/golang.org/x/net/webdav/prop_test.go')
-rw-r--r-- | vendor/golang.org/x/net/webdav/prop_test.go | 19 |
1 files changed, 11 insertions, 8 deletions
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 } |