summaryrefslogtreecommitdiff
path: root/testrig/config.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-06-14 18:00:57 +0200
committerLibravatar GitHub <noreply@github.com>2022-06-14 17:00:57 +0100
commit13e4bbdbfa104a2384834b634285dce2f4dafe2e (patch)
tree5407db0b6f42c9ceee83438a117b608223279c21 /testrig/config.go
parent[chore] Fix testrig emoji bug (#646) (diff)
downloadgotosocial-13e4bbdbfa104a2384834b634285dce2f4dafe2e.tar.xz
[chore] Duplicated media cleanup (#649)v0.3.5
* add migration to clean up duplicated media * use /tmp/gotosocial for testrig storage path * defer remove storage tempdir * skip if not attached to status or status not found * log errors at error level * only log delete as else clause if successful * just return nil on down * reword delete logic a little bit * check if storage base path is defined * check for status id more thoroughly * don't log error if just no rows * go fmt * break statusIDLoop when found * break currentlyUsedLoop when found
Diffstat (limited to 'testrig/config.go')
-rw-r--r--testrig/config.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/testrig/config.go b/testrig/config.go
index e424670fa..92d04c453 100644
--- a/testrig/config.go
+++ b/testrig/config.go
@@ -19,6 +19,9 @@
package testrig
import (
+ "os"
+ "path"
+
"github.com/coreos/go-oidc/v3/oidc"
"github.com/superseriousbusiness/gotosocial/internal/config"
)
@@ -64,7 +67,7 @@ var TestDefaults = config.Configuration{
MediaRemoteCacheDays: 30,
StorageBackend: "local",
- StorageLocalBasePath: "/gotosocial/storage",
+ StorageLocalBasePath: path.Join(os.TempDir(), "gotosocial"),
StatusesMaxChars: 5000,
StatusesCWMaxChars: 100,