mirror of
https://github.com/rclone/rclone
synced 2024-11-05 01:42:31 +01:00
address stringent ineffectual assignment check in golangci-lint (#5093)
This commit is contained in:
parent
0ad38dd6fa
commit
7aa7acd926
2
backend/cache/cache_internal_test.go
vendored
2
backend/cache/cache_internal_test.go
vendored
@ -1034,7 +1034,7 @@ func (r *run) updateObjectRemote(t *testing.T, f fs.Fs, remote string, data1 []b
|
|||||||
objInfo1 := object.NewStaticObjectInfo(remote, time.Now(), int64(len(data1)), true, nil, f)
|
objInfo1 := object.NewStaticObjectInfo(remote, time.Now(), int64(len(data1)), true, nil, f)
|
||||||
objInfo2 := object.NewStaticObjectInfo(remote, time.Now(), int64(len(data2)), true, nil, f)
|
objInfo2 := object.NewStaticObjectInfo(remote, time.Now(), int64(len(data2)), true, nil, f)
|
||||||
|
|
||||||
obj, err = f.Put(context.Background(), in1, objInfo1)
|
_, err = f.Put(context.Background(), in1, objInfo1)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
obj, err = f.NewObject(context.Background(), remote)
|
obj, err = f.NewObject(context.Background(), remote)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
@ -495,11 +495,11 @@ func testPreventCorruption(t *testing.T, f *Fs) {
|
|||||||
billyChunk4Name := billyChunkName(4)
|
billyChunk4Name := billyChunkName(4)
|
||||||
_, err = f.base.NewObject(ctx, billyChunk4Name)
|
_, err = f.base.NewObject(ctx, billyChunk4Name)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
billyChunk4, err := f.NewObject(ctx, billyChunk4Name)
|
_, err = f.NewObject(ctx, billyChunk4Name)
|
||||||
assertOverlapError(err)
|
assertOverlapError(err)
|
||||||
|
|
||||||
f.opt.FailHard = false
|
f.opt.FailHard = false
|
||||||
billyChunk4, err = f.NewObject(ctx, billyChunk4Name)
|
billyChunk4, err := f.NewObject(ctx, billyChunk4Name)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
require.NotNil(t, billyChunk4)
|
require.NotNil(t, billyChunk4)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user