mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Fix: failed test due to relative path
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/HFO4/cloudreve/pkg/conf"
|
||||
"github.com/HFO4/cloudreve/pkg/filesystem/fsctx"
|
||||
"github.com/HFO4/cloudreve/pkg/serializer"
|
||||
"github.com/HFO4/cloudreve/pkg/util"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"os"
|
||||
@@ -350,8 +351,8 @@ func TestFileSystem_Delete(t *testing.T) {
|
||||
//全部成功
|
||||
{
|
||||
fs.CleanTargets()
|
||||
file, err := os.Create("1.txt")
|
||||
file2, err := os.Create("2.txt")
|
||||
file, err := os.Create(util.RelativePath("1.txt"))
|
||||
file2, err := os.Create(util.RelativePath("2.txt"))
|
||||
file.Close()
|
||||
file2.Close()
|
||||
asserts.NoError(err)
|
||||
|
||||
Reference in New Issue
Block a user