forked from TrueCloudLab/rclone
Stop overwriting global remote in tests
This commit is contained in:
parent
1b2dda8c4c
commit
80c044f2d3
1 changed files with 5 additions and 4 deletions
|
@ -547,13 +547,14 @@ func TestObjectString(t *testing.T) {
|
||||||
func TestObjectFs(t *testing.T) {
|
func TestObjectFs(t *testing.T) {
|
||||||
skipIfNotOk(t)
|
skipIfNotOk(t)
|
||||||
obj := findObject(t, file1.Path)
|
obj := findObject(t, file1.Path)
|
||||||
if obj.Fs() != remote {
|
testRemote := remote
|
||||||
|
if obj.Fs() != testRemote {
|
||||||
// Check to see if this wraps something else
|
// Check to see if this wraps something else
|
||||||
if unwrap, ok := remote.(fs.UnWrapper); ok {
|
if unwrap, ok := testRemote.(fs.UnWrapper); ok {
|
||||||
remote = unwrap.UnWrap()
|
testRemote = unwrap.UnWrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert.Equal(t, obj.Fs(), remote)
|
assert.Equal(t, obj.Fs(), testRemote)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestObjectRemote tests the Remote is correct
|
// TestObjectRemote tests the Remote is correct
|
||||||
|
|
Loading…
Add table
Reference in a new issue