mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-20 16:49:03 +02:00
tests: correctly close filesystems
This commit is contained in:
@@ -61,6 +61,14 @@ func Bootstrap(ctx context.Context) error {
|
||||
return fmt.Errorf("failed to initialize file storage (backend: %s): %w", common.EnvConfig.FileBackend, err)
|
||||
}
|
||||
|
||||
// Close file storage after every service that depends on it has stopped
|
||||
defer func() {
|
||||
closeErr := fileStorage.Close()
|
||||
if closeErr != nil {
|
||||
slog.ErrorContext(ctx, "Failed to close file storage", slog.Any("error", closeErr))
|
||||
}
|
||||
}()
|
||||
|
||||
// Init application images
|
||||
imageExtensions, err := initApplicationImages(ctx, fileStorage)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user