Skip to content

Commit

Permalink
change test case
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn committed Jan 11, 2024
1 parent 8d84b90 commit 2b970ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions cmd_test/upload_form_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
package cmd

import (
"github.com/qiniu/qshell/v2/cmd_test/test"
"strings"
"testing"

"github.com/qiniu/qshell/v2/cmd_test/test"
)

func TestFormUpload(t *testing.T) {
Expand All @@ -19,7 +20,8 @@ func TestFormUpload(t *testing.T) {
result, errs := test.RunCmdWithError("fput", test.Bucket, "qshell_fput_1M", path,
"--mimetype", "image/jpg",
"--storage", "0",
"--file-type", "1")
"--file-type", "1",
"--end-user", "10")
if len(errs) > 0 {
t.Fail()
}
Expand Down
6 changes: 3 additions & 3 deletions cmd_test/upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ package cmd

import (
"encoding/json"
"github.com/qiniu/qshell/v2/cmd_test/test"
"github.com/qiniu/qshell/v2/iqshell/storage/object/upload/operations"
"path/filepath"
"strings"
"testing"

"github.com/qiniu/qshell/v2/cmd_test/test"
"github.com/qiniu/qshell/v2/iqshell/storage/object/upload/operations"
)

func TestQUpload(t *testing.T) {
Expand Down Expand Up @@ -71,7 +72,6 @@ func TestQUpload(t *testing.T) {
DisableForm: false,
WorkerCount: 4,
RecordRoot: "",
Policy: nil,
},
LogFile: logPath,
RecordRoot: recordPath,
Expand Down
2 changes: 2 additions & 0 deletions iqshell/storage/object/batch/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package batch
import (
"encoding/base64"
"fmt"

"github.com/qiniu/qshell/v2/iqshell/common/data"
"github.com/qiniu/qshell/v2/iqshell/common/flow"
)
Expand Down Expand Up @@ -58,6 +59,7 @@ type OperationResult struct {
PutTime int64 `json:"putTime"`
MimeType string `json:"mimeType"`
Type int `json:"type"`
EndUser string `json:"endUser"`
Error string `json:"error"`
Parts []int64 `json:"parts"`
}
Expand Down
1 change: 1 addition & 0 deletions iqshell/storage/object/operations/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func getResultInfo(bucket, key string, status object.StatusResult) string {
fieldAdder("Fsize", status.FSize, utils.FormatFileSize(status.FSize))
fieldAdder("PutTime", status.PutTime, time.Unix(0, status.PutTime*100).String())
fieldAdder("MimeType", status.MimeType, "")
fieldAdder("EndUser", status.EndUser, "")

fieldAdderWithValueDescs("Status", status.Status,
map[interface{}]string{1: "禁用"},
Expand Down

0 comments on commit 2b970ba

Please sign in to comment.