Signed-off-by: Roman Loginov <r.loginov@yadro.com>
This commit is contained in:
Roman Loginov 2024-05-20 19:19:40 +03:00 committed by Alexey Vanin
parent 21dbe3ea8e
commit 9152b084ec
3 changed files with 11 additions and 11 deletions

View file

@ -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) {

View file

@ -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))
}

View file

@ -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())
})
}
}