[#577] Fix tests

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
Angira Kekteeva 2022-08-05 05:41:33 +04:00 committed by Kira
parent 93e0cae743
commit dc77ad4863
3 changed files with 5 additions and 6 deletions

View file

@ -8,7 +8,6 @@ import (
"github.com/nspcc-dev/neofs-s3-gw/api"
"github.com/nspcc-dev/neofs-s3-gw/api/data"
"github.com/nspcc-dev/neofs-s3-gw/api/layer"
"github.com/stretchr/testify/require"
)
@ -54,7 +53,7 @@ func TestDeleteObjectFromSuspended(t *testing.T) {
versionID, isDeleteMarker := deleteObject(t, tc, bktName, objName, emptyVersion)
require.True(t, isDeleteMarker)
require.Equal(t, layer.UnversionedObjectVersionID, versionID)
require.Equal(t, data.UnversionedObjectVersionID, versionID)
}
func TestDeleteDeletedObject(t *testing.T) {

View file

@ -8,7 +8,7 @@ import (
"strconv"
"testing"
"github.com/nspcc-dev/neofs-s3-gw/api/layer"
"github.com/nspcc-dev/neofs-s3-gw/api/data"
"github.com/stretchr/testify/require"
)
@ -73,7 +73,7 @@ func TestListObjectNullVersions(t *testing.T) {
parseTestResponse(t, w, result)
require.Len(t, result.Version, 2)
require.Equal(t, layer.UnversionedObjectVersionID, result.Version[1].VersionID)
require.Equal(t, data.UnversionedObjectVersionID, result.Version[1].VersionID)
}
func TestS3CompatibilityBucketListV2BothContinuationTokenStartAfter(t *testing.T) {

View file

@ -249,7 +249,7 @@ func TestGetUnversioned(t *testing.T) {
})
require.NoError(t, err)
resInfo, buffer := tc.getObject(tc.obj, UnversionedObjectVersionID, false)
resInfo, buffer := tc.getObject(tc.obj, data.UnversionedObjectVersionID, false)
require.Equal(t, objContent, buffer)
require.Equal(t, objInfo.VersionID(), resInfo.VersionID())
}
@ -280,7 +280,7 @@ func TestVersioningDeleteSpecificObjectVersion(t *testing.T) {
versions := tc.listVersions()
for _, ver := range versions.DeleteMarker {
if ver.IsLatest {
tc.deleteObject(tc.obj, ver.Object.Version(), settings)
tc.deleteObject(tc.obj, ver.ObjectInfo.VersionID(), settings)
}
}