File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ require (
98
98
github.com/pion/udp v0.1.1 // indirect
99
99
github.com/pkg/errors v0.9.1 // indirect
100
100
github.com/pmezard/go-difflib v1.0.0 // indirect
101
+ github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef // indirect
101
102
github.com/sirupsen/logrus v1.8.1 // indirect
102
103
github.com/spf13/pflag v1.0.5 // indirect
103
104
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
Original file line number Diff line number Diff line change @@ -1087,6 +1087,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
1087
1087
github.com/prometheus/procfs v0.2.0 /go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU =
1088
1088
github.com/prometheus/procfs v0.6.0 /go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA =
1089
1089
github.com/prometheus/tsdb v0.7.1 /go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU =
1090
+ github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef h1:NKxTG6GVGbfMXc2mIk+KphcH6hagbVXhcFkbTgYleTI =
1091
+ github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef /go.mod h1:tcaRap0jS3eifrEEllL6ZMd9dg8IlDpi2S1oARrQ+NI =
1090
1092
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237 /go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo =
1091
1093
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 /go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo =
1092
1094
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af /go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg =
Original file line number Diff line number Diff line change
1
+ package nextrouter_test
2
+
3
+ import (
4
+ "io/fs"
5
+ "testing"
6
+
7
+ "github.com/psanford/memfs"
8
+ "github.com/stretchr/testify/require"
9
+ )
10
+
11
+ func TestConn (t * testing.T ) {
12
+ t .Parallel ()
13
+
14
+ t .Run ("Smoke test" , func (t * testing.T ) {
15
+ t .Parallel ()
16
+
17
+ rootFS := memfs .New ()
18
+ err := rootFS .MkdirAll ("test/a/b" , 0777 )
19
+ require .NoError (t , err )
20
+
21
+ rootFS .WriteFile ("test/a/b/c.txt" , []byte ("test123" ), 0755 )
22
+ content , err := fs .ReadFile (rootFS , "test/a/b/c.txt" )
23
+ require .NoError (t , err )
24
+
25
+ require .Equal (t , string (content ), "test123" )
26
+
27
+ //require.Equal(t, 1, 2)
28
+ })
29
+ }
You can’t perform that action at this time.
0 commit comments