]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/server_test.go
Allow for personal ~ folder
[rbdr/mobius] / hotline / server_test.go
index c3d38da57db7a6b35bda33b4308ffc0a88902740..d0e2372a9d4d8e9cd83afbfc1acf9995a4ea4268 100644 (file)
@@ -99,12 +99,7 @@ func TestServer_handleFileTransfer(t *testing.T) {
                {
                        name: "file download",
                        fields: fields{
-                               FS: &OSFileStore{},
-                               Config: Config{
-                                       FileRoot: func() string {
-                                               path, _ := os.Getwd()
-                                               return path + "/test/config/Files"
-                                       }()},
+                               FS:     &OSFileStore{},
                                Logger: NewTestLogger(),
                                Stats:  NewStats(),
                                FileTransferMgr: &MemFileTransferMgr{
@@ -114,6 +109,10 @@ func TestServer_handleFileTransfer(t *testing.T) {
                                                        Type:     FileDownload,
                                                        FileName: []byte("testfile-8b"),
                                                        FilePath: []byte{},
+                                                       FileRoot: func() string {
+                                                               path, _ := os.Getwd()
+                                                               return path + "/test/config/Files"
+                                                       }(),
                                                        ClientConn: &ClientConn{
                                                                Account: &Account{
                                                                        Login: "foo",