Fix: test failed due to Policy.AutoName

This commit is contained in:
HFO4
2019-11-19 17:20:59 +08:00
parent 88a543ef74
commit 20ea86eaf6
5 changed files with 49 additions and 1 deletions

View File

@@ -76,7 +76,9 @@ func TestPolicy_GeneratePath(t *testing.T) {
func TestPolicy_GenerateFileName(t *testing.T) {
asserts := assert.New(t)
testPolicy := Policy{}
testPolicy := Policy{
AutoRename: true,
}
testPolicy.FileNameRule = "{randomkey16}"
asserts.Len(testPolicy.GenerateFileName(1, "123.txt"), 16)