Skip to content

Commit 3f2cc50

Browse files
committed
fix: fix goimports & remove obj path test
1 parent 7b30191 commit 3f2cc50

File tree

6 files changed

+10
-14
lines changed

6 files changed

+10
-14
lines changed

controller/branch_ctl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ package controller
33
import (
44
"context"
55
"errors"
6+
"net/http"
7+
68
"github.com/jiaozifs/jiaozifs/block/params"
79
"github.com/jiaozifs/jiaozifs/controller/validator"
810
"github.com/jiaozifs/jiaozifs/versionmgr"
9-
"net/http"
1011

1112
"github.com/jiaozifs/jiaozifs/api"
1213
"github.com/jiaozifs/jiaozifs/auth"

controller/object_ctl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
"github.com/jiaozifs/jiaozifs/controller/validator"
87
"io"
98
"mime"
109
"mime/multipart"
1110
"net/http"
1211
"time"
1312

13+
"github.com/jiaozifs/jiaozifs/controller/validator"
14+
1415
"github.com/go-openapi/swag"
1516
logging "github.com/ipfs/go-log/v2"
1617
"github.com/jiaozifs/jiaozifs/api"

controller/repository_ctl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7-
"github.com/jiaozifs/jiaozifs/controller/validator"
87
"io"
98
"net/http"
109
"time"
1110

11+
"github.com/jiaozifs/jiaozifs/controller/validator"
12+
1213
"github.com/google/uuid"
1314
logging "github.com/ipfs/go-log/v2"
1415
"github.com/jiaozifs/jiaozifs/api"

controller/user_ctl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ package controller
33
import (
44
"context"
55
"encoding/hex"
6-
"github.com/jiaozifs/jiaozifs/controller/validator"
76
"net/http"
87
"time"
98

9+
"github.com/jiaozifs/jiaozifs/controller/validator"
10+
1011
"github.com/jiaozifs/jiaozifs/utils"
1112

1213
"github.com/go-openapi/swag"

integrationtest/branch_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package integrationtest
22

33
import (
44
"context"
5-
"github.com/jiaozifs/jiaozifs/controller/validator"
65
"net/http"
76
"strings"
87

8+
"github.com/jiaozifs/jiaozifs/controller/validator"
9+
910
"github.com/jiaozifs/jiaozifs/api"
1011
apiimpl "github.com/jiaozifs/jiaozifs/api/api_impl"
1112
"github.com/jiaozifs/jiaozifs/utils"

integrationtest/objects_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,6 @@ func ObjectSpec(ctx context.Context, urlStr string) func(c convey.C) {
9393
convey.So(resp.StatusCode, convey.ShouldEqual, http.StatusBadRequest)
9494
})
9595

96-
c.Convey("invalid path", func() {
97-
resp, err := client.UploadObjectWithBody(ctx, userName, repoName, &api.UploadObjectParams{
98-
RefName: branchName,
99-
Path: "a~a.bin",
100-
}, "application/octet-stream", bytes.NewReader([]byte{1, 2, 3, 4, 5, 6, 7, 8}))
101-
convey.So(err, convey.ShouldBeNil)
102-
convey.So(resp.StatusCode, convey.ShouldEqual, http.StatusBadRequest)
103-
})
104-
10596
c.Convey("no sufix file", func() {
10697
resp, err := client.UploadObjectWithBody(ctx, userName, repoName, &api.UploadObjectParams{
10798
RefName: branchName,

0 commit comments

Comments
 (0)