From 9152b084ec4195279b759b22ae0006c21b5d62ae Mon Sep 17 00:00:00 2001 From: Roman Loginov Date: Mon, 20 May 2024 19:19:40 +0300 Subject: [PATCH] [#387] Fix typo Signed-off-by: Roman Loginov --- api/handler/multipart_upload_test.go | 6 +++--- api/handler/put_test.go | 6 +++--- pkg/service/tree/tree_test.go | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api/handler/multipart_upload_test.go b/api/handler/multipart_upload_test.go index 5fdbe243..845e388b 100644 --- a/api/handler/multipart_upload_test.go +++ b/api/handler/multipart_upload_test.go @@ -301,9 +301,9 @@ func TestMultipartUploadWithContentLanguage(t *testing.T) { createTestBucket(hc, bktName) partSize := 5 * 1024 * 1024 - exceptedContentLanguage := "en" + expectedContentLanguage := "en" headers := map[string]string{ - api.ContentLanguage: exceptedContentLanguage, + api.ContentLanguage: expectedContentLanguage, } multipartUpload := createMultipartUpload(hc, bktName, objName, headers) @@ -314,7 +314,7 @@ func TestMultipartUploadWithContentLanguage(t *testing.T) { w, r := prepareTestRequest(hc, bktName, objName, nil) hc.Handler().HeadObjectHandler(w, r) - require.Equal(t, exceptedContentLanguage, w.Header().Get(api.ContentLanguage)) + require.Equal(t, expectedContentLanguage, w.Header().Get(api.ContentLanguage)) } func TestMultipartUploadEnabledMD5(t *testing.T) { diff --git a/api/handler/put_test.go b/api/handler/put_test.go index cad7416d..4bf7078b 100644 --- a/api/handler/put_test.go +++ b/api/handler/put_test.go @@ -453,14 +453,14 @@ func getObjectAttribute(obj *object.Object, attrName string) string { func TestPutObjectWithContentLanguage(t *testing.T) { tc := prepareHandlerContext(t) - exceptedContentLanguage := "en" + expectedContentLanguage := "en" bktName, objName := "bucket-1", "object-1" createTestBucket(tc, bktName) w, r := prepareTestRequest(tc, bktName, objName, nil) - r.Header.Set(api.ContentLanguage, exceptedContentLanguage) + r.Header.Set(api.ContentLanguage, expectedContentLanguage) tc.Handler().PutObjectHandler(w, r) tc.Handler().HeadObjectHandler(w, r) - require.Equal(t, exceptedContentLanguage, w.Header().Get(api.ContentLanguage)) + require.Equal(t, expectedContentLanguage, w.Header().Get(api.ContentLanguage)) } diff --git a/pkg/service/tree/tree_test.go b/pkg/service/tree/tree_test.go index 101876b2..ec288203 100644 --- a/pkg/service/tree/tree_test.go +++ b/pkg/service/tree/tree_test.go @@ -185,7 +185,7 @@ func TestGetLatestNode(t *testing.T) { for _, tc := range []struct { name string nodes []NodeResponse - exceptedNodeID uint64 + expectedNodeID uint64 error bool }{ { @@ -208,7 +208,7 @@ func TestGetLatestNode(t *testing.T) { }, }, }, - exceptedNodeID: 1, + expectedNodeID: 1, }, { name: "one node of the object version and one node of the secondary object", @@ -231,7 +231,7 @@ func TestGetLatestNode(t *testing.T) { }, }, }, - exceptedNodeID: 1, + expectedNodeID: 1, }, { name: "all nodes represent a secondary object", @@ -289,7 +289,7 @@ func TestGetLatestNode(t *testing.T) { meta: []nodeMeta{}, }, }, - exceptedNodeID: 4, + expectedNodeID: 4, }, } { t.Run(tc.name, func(t *testing.T) { @@ -300,7 +300,7 @@ func TestGetLatestNode(t *testing.T) { } require.NoError(t, err) - require.Equal(t, tc.exceptedNodeID, actualNode.GetNodeID()) + require.Equal(t, tc.expectedNodeID, actualNode.GetNodeID()) }) } }