mirror of https://github.com/usememos/memos.git
chore: fix tests
This commit is contained in:
parent
fd29a98c90
commit
edcddf3c95
|
|
@ -48,6 +48,9 @@ func NewTestService(t *testing.T) *TestService {
|
|||
MarkdownService: markdownService,
|
||||
}
|
||||
|
||||
// Clear any cached state from previous tests
|
||||
service.ClearInstanceOwnerCache()
|
||||
|
||||
return &TestService{
|
||||
Service: service,
|
||||
Store: testStore,
|
||||
|
|
@ -58,8 +61,8 @@ func NewTestService(t *testing.T) *TestService {
|
|||
|
||||
// Cleanup clears caches and closes resources after test.
|
||||
func (ts *TestService) Cleanup() {
|
||||
ts.Service.ClearInstanceOwnerCache()
|
||||
ts.Store.Close()
|
||||
// Note: Owner cache is package-level in parent package, cannot clear from test package
|
||||
}
|
||||
|
||||
// CreateHostUser creates an admin user for testing.
|
||||
|
|
|
|||
Loading…
Reference in New Issue