mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
Move a lot of stuff + tidy stuff (#37)
Lots of renaming and moving stuff, some bug fixes, more lenient parsing of notifications and home timeline.
This commit is contained in:
@ -22,12 +22,12 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/superseriousbusiness/gotosocial/internal/storage"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/blob"
|
||||
)
|
||||
|
||||
// NewTestStorage returns a new in memory storage with the default test config
|
||||
func NewTestStorage() storage.Storage {
|
||||
s, err := storage.NewInMem(NewTestConfig(), NewTestLog())
|
||||
func NewTestStorage() blob.Storage {
|
||||
s, err := blob.NewInMem(NewTestConfig(), NewTestLog())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -35,7 +35,7 @@ func NewTestStorage() storage.Storage {
|
||||
}
|
||||
|
||||
// StandardStorageSetup populates the storage with standard test entries from the given directory.
|
||||
func StandardStorageSetup(s storage.Storage, relativePath string) {
|
||||
func StandardStorageSetup(s blob.Storage, relativePath string) {
|
||||
storedA := newTestStoredAttachments()
|
||||
a := NewTestAttachments()
|
||||
for k, paths := range storedA {
|
||||
@ -92,7 +92,7 @@ func StandardStorageSetup(s storage.Storage, relativePath string) {
|
||||
}
|
||||
|
||||
// StandardStorageTeardown deletes everything in storage so that it's clean for the next test
|
||||
func StandardStorageTeardown(s storage.Storage) {
|
||||
func StandardStorageTeardown(s blob.Storage) {
|
||||
keys, err := s.ListKeys()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Reference in New Issue
Block a user