瀏覽代碼

set track_quota to 2 as default

Nicola Murino 6 年之前
父節點
當前提交
1566e43cd7
共有 3 個文件被更改,包括 9 次插入5 次删除
  1. 2 2
      README.md
  2. 6 2
      sftpd/sftpd_test.go
  3. 1 1
      sftpgo.conf

+ 2 - 2
README.md

@@ -84,7 +84,7 @@ The `sftpgo.conf` configuration file contains the following sections:
             - `target_path`, added for `rename` action only
 - **"data_provider"**, the configuration for the data provider
     - `driver`, string. Supported drivers are `sqlite`, `mysql`, `postgresql`
-    - `name`, string. Database name
+    - `name`, string. Database name. For driver `sqlite` this can be the database name relative to the config dir or the absolute path to the SQLite database.
     - `host`, string. Database host. Leave empty for driver `sqlite`
     - `port`, integer. Database port. Leave empty for driver `sqlite`
     - `username`, string. Database user. Leave empty for driver `sqlite`
@@ -129,7 +129,7 @@ Here is a full example showing the default config:
         "connection_string":"",
         "users_table":"users",
         "manage_users":1,
-        "track_quota":1
+        "track_quota":2
     },
     "httpd":{
         "bind_port":8080,

+ 6 - 2
sftpd/sftpd_test.go

@@ -151,7 +151,9 @@ func TestInitialization(t *testing.T) {
 
 func TestBasicSFTPHandling(t *testing.T) {
 	usePubKey := false
-	user, err := api.AddUser(getTestUser(usePubKey), http.StatusOK)
+	u := getTestUser(usePubKey)
+	u.QuotaSize = 6553600
+	user, err := api.AddUser(u, http.StatusOK)
 	if err != nil {
 		t.Errorf("unable to add user: %v", err)
 	}
@@ -629,7 +631,9 @@ func TestMaxSessions(t *testing.T) {
 
 func TestQuotaFileReplace(t *testing.T) {
 	usePubKey := false
-	user, err := api.AddUser(getTestUser(usePubKey), http.StatusOK)
+	u := getTestUser(usePubKey)
+	u.QuotaFiles = 1000
+	user, err := api.AddUser(u, http.StatusOK)
 	if err != nil {
 		t.Errorf("unable to add user: %v", err)
 	}

+ 1 - 1
sftpgo.conf

@@ -23,7 +23,7 @@
         "connection_string":"",
         "users_table":"users",
         "manage_users":1,
-        "track_quota":1
+        "track_quota":2
     },
     "httpd":{
         "bind_port":8080,