commit ffb0f3d163a21b6e43ed3f0c0c942005bd0bb4c8
parent e72454ff7e26e1c102d7532561154cd9c453787e
Author: Matsuda Kenji <info@mtkn.jp>
Date: Sat, 14 Oct 2023 07:11:49 +0900
add test for client
Diffstat:
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/client_test.go b/client_test.go
@@ -18,7 +18,7 @@ func newClientForTest(msize uint32, uname string, tmsgc chan<- Msg, rmsgc <-chan
msize: mSize,
mSizeLock: new(sync.Mutex),
uname: uname,
- fPool: allocFidPool(),
+ fPool: allocClientFidPool(),
rPool: newClientReqPool(),
errc: make(chan error),
cancel: cancel,
@@ -118,3 +118,18 @@ func TestTransaction(t *testing.T) {
t.Log(rattach)
}
}
+
+func TestClient2(t *testing.T) {
+ cr, sw := io.Pipe()
+ sr, cw := io.Pipe()
+
+ server := NewServer(fsys, mSize, sr, sw)
+ //server.Chatty()
+ go server.Serve()
+
+ fs, err := Mount(cr, cw, "kenji", "")
+ if err != nil {
+ t.Errorf("mount: %v", err)
+ }
+ t.Log(fs)
+}
+\ No newline at end of file