test(wopi): add tests for wopi client

This commit is contained in:
HFO4
2023-01-10 19:56:02 +08:00
parent f7fdf10d70
commit 99434d7aa5
7 changed files with 462 additions and 13 deletions

View File

@@ -165,9 +165,9 @@ func (c *client) NewSession(user *model.User, file *model.File, action ActonType
UserID: user.ID,
Action: action,
}
err = cache.Set(SessionCachePrefix+sessionID.String(), *session, ttl)
err = c.cache.Set(SessionCachePrefix+sessionID.String(), *session, ttl)
if err != nil {
return nil, fmt.Errorf("failed to create document session: %s", err)
return nil, fmt.Errorf("failed to create document session: %w", err)
}
sessionRes := &Session{