From d07c7adfee3aaf44d84cc0c9eea5b9ea514fdf71 Mon Sep 17 00:00:00 2001 From: Li Kexian Date: Mon, 29 Jul 2019 18:50:21 +0800 Subject: [PATCH] fixed the testing --- auth_test.go | 5 ++++- object_part_test.go | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/auth_test.go b/auth_test.go index bf1b6c5..e735e5b 100644 --- a/auth_test.go +++ b/auth_test.go @@ -45,7 +45,10 @@ func TestAuthorizationTransport(t *testing.T) { } }) - client.client.Transport = &AuthorizationTransport{} + client.client.Transport = &AuthorizationTransport{ + SecretID: "test", + SecretKey: "test", + } req, _ := http.NewRequest("GET", client.BaseURL.BucketURL.String(), nil) client.doAPI(context.Background(), req, nil, true) } diff --git a/object_part_test.go b/object_part_test.go index 662d4ed..16b7ed2 100644 --- a/object_part_test.go +++ b/object_part_test.go @@ -168,7 +168,7 @@ func TestObjectService_ListParts(t *testing.T) { }) ref, _, err := client.Object.ListParts(context.Background(), - name, uploadID) + name, uploadID, nil) if err != nil { t.Fatalf("Object.ListParts returned error: %v", err) } @@ -182,7 +182,7 @@ func TestObjectService_ListParts(t *testing.T) { ID: "1253846586", DisplayName: "1253846586", }, - PartNumberMarker: 0, + PartNumberMarker: "0", Initiator: &Initiator{ ID: "qcs::cam::uin/100000760461:uin/100000760461", DisplayName: "100000760461", @@ -202,7 +202,7 @@ func TestObjectService_ListParts(t *testing.T) { }, }, StorageClass: "Standard", - MaxParts: 1000, + MaxParts: "1000", IsTruncated: false, }