summaryrefslogtreecommitdiff
path: root/testrig
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2025-04-26 15:34:10 +0200
committerLibravatar Daenney <daenney@users.noreply.github.com>2025-04-26 15:38:43 +0200
commitab10266bff8d3dea1655e5f98a932efa2474bdb6 (patch)
treedef81628d7a7c81b8ad0c971fb02ebc945eca75c /testrig
parent[chore] Set up Github to be a mirror (diff)
downloadgotosocial-ab10266bff8d3dea1655e5f98a932efa2474bdb6.tar.xz
[feature] Move to code.superseriousbusiness.org
Diffstat (limited to 'testrig')
-rw-r--r--testrig/config.go6
-rw-r--r--testrig/db.go10
-rw-r--r--testrig/email.go6
-rw-r--r--testrig/federatingdb.go12
-rw-r--r--testrig/federator.go14
-rw-r--r--testrig/gin.go2
-rw-r--r--testrig/log.go4
-rw-r--r--testrig/mediahandler.go4
-rw-r--r--testrig/oauthserver.go6
-rw-r--r--testrig/processor.go22
-rw-r--r--testrig/router.go6
-rw-r--r--testrig/storage.go2
-rw-r--r--testrig/testmodels.go12
-rw-r--r--testrig/teststructs.go22
-rw-r--r--testrig/transportcontroller.go20
-rw-r--r--testrig/util.go8
-rw-r--r--testrig/webpush.go6
17 files changed, 81 insertions, 81 deletions
diff --git a/testrig/config.go b/testrig/config.go
index 9f17530c4..ec7b72faa 100644
--- a/testrig/config.go
+++ b/testrig/config.go
@@ -24,11 +24,11 @@ import (
"strconv"
"time"
+ "code.superseriousbusiness.org/gotosocial/internal/config"
+ "code.superseriousbusiness.org/gotosocial/internal/language"
+ "code.superseriousbusiness.org/gotosocial/internal/media/ffmpeg"
"codeberg.org/gruf/go-bytesize"
"github.com/coreos/go-oidc/v3/oidc"
- "github.com/superseriousbusiness/gotosocial/internal/config"
- "github.com/superseriousbusiness/gotosocial/internal/language"
- "github.com/superseriousbusiness/gotosocial/internal/media/ffmpeg"
)
func init() {
diff --git a/testrig/db.go b/testrig/db.go
index 2f44b3777..4c8a3568d 100644
--- a/testrig/db.go
+++ b/testrig/db.go
@@ -20,11 +20,11 @@ package testrig
import (
"context"
- "github.com/superseriousbusiness/gotosocial/internal/db"
- "github.com/superseriousbusiness/gotosocial/internal/db/bundb"
- "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/log"
- "github.com/superseriousbusiness/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/db"
+ "code.superseriousbusiness.org/gotosocial/internal/db/bundb"
+ "code.superseriousbusiness.org/gotosocial/internal/gtsmodel"
+ "code.superseriousbusiness.org/gotosocial/internal/log"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
)
var testModels = []interface{}{
diff --git a/testrig/email.go b/testrig/email.go
index a80054f30..5ebc3a4d6 100644
--- a/testrig/email.go
+++ b/testrig/email.go
@@ -18,9 +18,9 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/config"
- "github.com/superseriousbusiness/gotosocial/internal/email"
- "github.com/superseriousbusiness/gotosocial/internal/log"
+ "code.superseriousbusiness.org/gotosocial/internal/config"
+ "code.superseriousbusiness.org/gotosocial/internal/email"
+ "code.superseriousbusiness.org/gotosocial/internal/log"
)
// NewEmailSender returns a noop email sender that won't make any remote calls.
diff --git a/testrig/federatingdb.go b/testrig/federatingdb.go
index 73731abae..28c6bd7b4 100644
--- a/testrig/federatingdb.go
+++ b/testrig/federatingdb.go
@@ -18,12 +18,12 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/federation/federatingdb"
- "github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
- "github.com/superseriousbusiness/gotosocial/internal/filter/spam"
- "github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
- "github.com/superseriousbusiness/gotosocial/internal/state"
- "github.com/superseriousbusiness/gotosocial/internal/typeutils"
+ "code.superseriousbusiness.org/gotosocial/internal/federation/federatingdb"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/interaction"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/spam"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/visibility"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/typeutils"
)
// NewTestFederatingDB returns a federating DB with the underlying db
diff --git a/testrig/federator.go b/testrig/federator.go
index cd4f38b10..d0f5b52f2 100644
--- a/testrig/federator.go
+++ b/testrig/federator.go
@@ -18,13 +18,13 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/federation"
- "github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
- "github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
- "github.com/superseriousbusiness/gotosocial/internal/media"
- "github.com/superseriousbusiness/gotosocial/internal/state"
- "github.com/superseriousbusiness/gotosocial/internal/transport"
- "github.com/superseriousbusiness/gotosocial/internal/typeutils"
+ "code.superseriousbusiness.org/gotosocial/internal/federation"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/interaction"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/visibility"
+ "code.superseriousbusiness.org/gotosocial/internal/media"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/transport"
+ "code.superseriousbusiness.org/gotosocial/internal/typeutils"
)
// NewTestFederator returns a federator with the given database and (mock!!) transport controller.
diff --git a/testrig/gin.go b/testrig/gin.go
index cd32654e8..2afe34e29 100644
--- a/testrig/gin.go
+++ b/testrig/gin.go
@@ -20,8 +20,8 @@ package testrig
import (
"net/http"
+ "code.superseriousbusiness.org/gotosocial/internal/router"
"github.com/gin-gonic/gin"
- "github.com/superseriousbusiness/gotosocial/internal/router"
)
// CreateGinTextContext creates a new gin.Context suitable for a test, with an instantiated gin.Engine.
diff --git a/testrig/log.go b/testrig/log.go
index 439ed72b0..eb00483e7 100644
--- a/testrig/log.go
+++ b/testrig/log.go
@@ -18,8 +18,8 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/config"
- "github.com/superseriousbusiness/gotosocial/internal/log"
+ "code.superseriousbusiness.org/gotosocial/internal/config"
+ "code.superseriousbusiness.org/gotosocial/internal/log"
"gopkg.in/mcuadros/go-syslog.v2"
"gopkg.in/mcuadros/go-syslog.v2/format"
)
diff --git a/testrig/mediahandler.go b/testrig/mediahandler.go
index d61ba854d..d67fdfd3d 100644
--- a/testrig/mediahandler.go
+++ b/testrig/mediahandler.go
@@ -18,8 +18,8 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/media"
- "github.com/superseriousbusiness/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/media"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
)
// NewTestMediaManager returns a media handler with the default test config, and the given db and storage.
diff --git a/testrig/oauthserver.go b/testrig/oauthserver.go
index 9429e751b..817e6ad0e 100644
--- a/testrig/oauthserver.go
+++ b/testrig/oauthserver.go
@@ -20,9 +20,9 @@ package testrig
import (
"context"
- "github.com/superseriousbusiness/gotosocial/internal/oauth"
- "github.com/superseriousbusiness/gotosocial/internal/oauth/handlers"
- "github.com/superseriousbusiness/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/oauth"
+ "code.superseriousbusiness.org/gotosocial/internal/oauth/handlers"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
)
// NewTestOauthServer returns an oauth server with the given db
diff --git a/testrig/processor.go b/testrig/processor.go
index 2df7ef197..d2405a6f0 100644
--- a/testrig/processor.go
+++ b/testrig/processor.go
@@ -18,17 +18,17 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/cleaner"
- "github.com/superseriousbusiness/gotosocial/internal/email"
- "github.com/superseriousbusiness/gotosocial/internal/federation"
- "github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
- "github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
- "github.com/superseriousbusiness/gotosocial/internal/media"
- "github.com/superseriousbusiness/gotosocial/internal/processing"
- "github.com/superseriousbusiness/gotosocial/internal/state"
- "github.com/superseriousbusiness/gotosocial/internal/subscriptions"
- "github.com/superseriousbusiness/gotosocial/internal/typeutils"
- "github.com/superseriousbusiness/gotosocial/internal/webpush"
+ "code.superseriousbusiness.org/gotosocial/internal/cleaner"
+ "code.superseriousbusiness.org/gotosocial/internal/email"
+ "code.superseriousbusiness.org/gotosocial/internal/federation"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/interaction"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/visibility"
+ "code.superseriousbusiness.org/gotosocial/internal/media"
+ "code.superseriousbusiness.org/gotosocial/internal/processing"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/subscriptions"
+ "code.superseriousbusiness.org/gotosocial/internal/typeutils"
+ "code.superseriousbusiness.org/gotosocial/internal/webpush"
)
// NewTestProcessor returns a Processor suitable for testing purposes.
diff --git a/testrig/router.go b/testrig/router.go
index 20317dae6..133320ff4 100644
--- a/testrig/router.go
+++ b/testrig/router.go
@@ -23,10 +23,10 @@ import (
"path/filepath"
"strconv"
+ "code.superseriousbusiness.org/gotosocial/internal/config"
+ "code.superseriousbusiness.org/gotosocial/internal/db"
+ "code.superseriousbusiness.org/gotosocial/internal/router"
"github.com/gin-gonic/gin"
- "github.com/superseriousbusiness/gotosocial/internal/config"
- "github.com/superseriousbusiness/gotosocial/internal/db"
- "github.com/superseriousbusiness/gotosocial/internal/router"
)
// NewTestRouter returns a Router suitable for testing
diff --git a/testrig/storage.go b/testrig/storage.go
index 1f833044f..7c5a94236 100644
--- a/testrig/storage.go
+++ b/testrig/storage.go
@@ -23,8 +23,8 @@ import (
"os"
"path"
+ gtsstorage "code.superseriousbusiness.org/gotosocial/internal/storage"
"codeberg.org/gruf/go-storage/memory"
- gtsstorage "github.com/superseriousbusiness/gotosocial/internal/storage"
)
// NewInMemoryStorage returns a new in memory storage with the default test config
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index c059d4065..37d4ecf84 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -37,10 +37,10 @@ import (
"code.superseriousbusiness.org/activity/pub"
"code.superseriousbusiness.org/activity/streams"
"code.superseriousbusiness.org/activity/streams/vocab"
- "github.com/superseriousbusiness/gotosocial/internal/ap"
- "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/transport"
- "github.com/superseriousbusiness/gotosocial/internal/util"
+ "code.superseriousbusiness.org/gotosocial/internal/ap"
+ "code.superseriousbusiness.org/gotosocial/internal/gtsmodel"
+ "code.superseriousbusiness.org/gotosocial/internal/transport"
+ "code.superseriousbusiness.org/gotosocial/internal/util"
)
// NewTestTokens returns a map of tokens keyed according to which account the token belongs to.
@@ -1914,8 +1914,8 @@ func NewTestInstances() map[string]*gtsmodel.Instance {
Title: "GoToSocial Testrig Instance",
ShortDescription: "<p>This is the GoToSocial testrig. It doesn't federate or anything.</p><p>When the testrig is shut down, all data on it will be deleted.</p><p>Don't use this in production!</p>",
ShortDescriptionText: "This is the GoToSocial testrig. It doesn't federate or anything.\n\nWhen the testrig is shut down, all data on it will be deleted.\n\nDon't use this in production!",
- Description: "<p>Here's a fuller description of the GoToSocial testrig instance.</p><p>This instance is for testing purposes only. It doesn't federate at all. Go check out <a href=\"https://github.com/superseriousbusiness/gotosocial/tree/main/testrig\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">https://github.com/superseriousbusiness/gotosocial/tree/main/testrig</a> and <a href=\"https://github.com/superseriousbusiness/gotosocial/blob/main/CONTRIBUTING.md#testing\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">https://github.com/superseriousbusiness/gotosocial/blob/main/CONTRIBUTING.md#testing</a></p><p>Users on this instance:</p><ul><li><span class=\"h-card\"><a href=\"http://localhost:8080/@admin\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>admin</span></a></span> (admin!).</li><li><span class=\"h-card\"><a href=\"http://localhost:8080/@1happyturtle\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>1happyturtle</span></a></span> (posts about turtles, we don't know why).</li><li><span class=\"h-card\"><a href=\"http://localhost:8080/@the_mighty_zork\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>the_mighty_zork</span></a></span> (who knows).</li></ul><p>If you need to edit the models for the testrig, you can do so at <code>internal/testmodels.go</code>.</p>",
- DescriptionText: "Here's a fuller description of the GoToSocial testrig instance.\n\nThis instance is for testing purposes only. It doesn't federate at all. Go check out https://github.com/superseriousbusiness/gotosocial/tree/main/testrig and https://github.com/superseriousbusiness/gotosocial/blob/main/CONTRIBUTING.md#testing\n\nUsers on this instance:\n\n- @admin (admin!).\n- @1happyturtle (posts about turtles, we don't know why).\n- @the_mighty_zork (who knows).\n\nIf you need to edit the models for the testrig, you can do so at `internal/testmodels.go`.",
+ Description: "<p>Here's a fuller description of the GoToSocial testrig instance.</p><p>This instance is for testing purposes only. It doesn't federate at all. Go check out <a href=\"https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/testrig\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/testrig</a> and <a href=\"https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md#testing\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md#testing</a></p><p>Users on this instance:</p><ul><li><span class=\"h-card\"><a href=\"http://localhost:8080/@admin\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>admin</span></a></span> (admin!).</li><li><span class=\"h-card\"><a href=\"http://localhost:8080/@1happyturtle\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>1happyturtle</span></a></span> (posts about turtles, we don't know why).</li><li><span class=\"h-card\"><a href=\"http://localhost:8080/@the_mighty_zork\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>the_mighty_zork</span></a></span> (who knows).</li></ul><p>If you need to edit the models for the testrig, you can do so at <code>internal/testmodels.go</code>.</p>",
+ DescriptionText: "Here's a fuller description of the GoToSocial testrig instance.\n\nThis instance is for testing purposes only. It doesn't federate at all. Go check out https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/testrig and https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md#testing\n\nUsers on this instance:\n\n- @admin (admin!).\n- @1happyturtle (posts about turtles, we don't know why).\n- @the_mighty_zork (who knows).\n\nIf you need to edit the models for the testrig, you can do so at `internal/testmodels.go`.",
Terms: "<p>This is where a list of terms and conditions might go.</p><p>For example:</p><p>If you want to sign up on this instance, you oughta know that we:</p><ol><li>Will sell your data to whoever offers.</li><li>Secure the server with password <code>password</code> wherever possible.</li></ol>",
TermsText: "This is where a list of terms and conditions might go.\n\nFor example:\n\nIf you want to sign up on this instance, you oughta know that we:\n\n1. Will sell your data to whoever offers.\n2. Secure the server with password `password` wherever possible.",
ContactEmail: "admin@example.org",
diff --git a/testrig/teststructs.go b/testrig/teststructs.go
index d438ac2cd..3ca45e94e 100644
--- a/testrig/teststructs.go
+++ b/testrig/teststructs.go
@@ -18,17 +18,17 @@
package testrig
import (
- "github.com/superseriousbusiness/gotosocial/internal/admin"
- "github.com/superseriousbusiness/gotosocial/internal/cleaner"
- "github.com/superseriousbusiness/gotosocial/internal/email"
- "github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
- "github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
- "github.com/superseriousbusiness/gotosocial/internal/processing"
- "github.com/superseriousbusiness/gotosocial/internal/processing/common"
- "github.com/superseriousbusiness/gotosocial/internal/state"
- "github.com/superseriousbusiness/gotosocial/internal/subscriptions"
- "github.com/superseriousbusiness/gotosocial/internal/transport"
- "github.com/superseriousbusiness/gotosocial/internal/typeutils"
+ "code.superseriousbusiness.org/gotosocial/internal/admin"
+ "code.superseriousbusiness.org/gotosocial/internal/cleaner"
+ "code.superseriousbusiness.org/gotosocial/internal/email"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/interaction"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/visibility"
+ "code.superseriousbusiness.org/gotosocial/internal/processing"
+ "code.superseriousbusiness.org/gotosocial/internal/processing/common"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/subscriptions"
+ "code.superseriousbusiness.org/gotosocial/internal/transport"
+ "code.superseriousbusiness.org/gotosocial/internal/typeutils"
)
// TestStructs encapsulates structs needed to
diff --git a/testrig/transportcontroller.go b/testrig/transportcontroller.go
index ae7a846d3..34ed35255 100644
--- a/testrig/transportcontroller.go
+++ b/testrig/transportcontroller.go
@@ -29,14 +29,14 @@ import (
"code.superseriousbusiness.org/activity/pub"
"code.superseriousbusiness.org/activity/streams"
"code.superseriousbusiness.org/activity/streams/vocab"
- "github.com/superseriousbusiness/gotosocial/internal/ap"
- apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
- "github.com/superseriousbusiness/gotosocial/internal/federation"
- "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/httpclient"
- "github.com/superseriousbusiness/gotosocial/internal/log"
- "github.com/superseriousbusiness/gotosocial/internal/state"
- "github.com/superseriousbusiness/gotosocial/internal/transport"
+ "code.superseriousbusiness.org/gotosocial/internal/ap"
+ apimodel "code.superseriousbusiness.org/gotosocial/internal/api/model"
+ "code.superseriousbusiness.org/gotosocial/internal/federation"
+ "code.superseriousbusiness.org/gotosocial/internal/gtsmodel"
+ "code.superseriousbusiness.org/gotosocial/internal/httpclient"
+ "code.superseriousbusiness.org/gotosocial/internal/log"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
+ "code.superseriousbusiness.org/gotosocial/internal/transport"
)
const (
@@ -410,7 +410,7 @@ func NodeInfoResponse(req *http.Request) (
Software: apimodel.NodeInfoSoftware{
Name: "GoToSocial",
Version: "1.3.1.2",
- Repository: "https://github.com/superseriousbusiness/gotosocial",
+ Repository: "https://codeberg.org/superseriousbusiness/gotosocial",
Homepage: "https://docs.gotosocial.org",
},
Protocols: []string{"activitypub"},
@@ -421,7 +421,7 @@ func NodeInfoResponse(req *http.Request) (
Software: apimodel.NodeInfoSoftware{
Name: "GoToSocial",
Version: "1.3.1.2",
- Repository: "https://github.com/superseriousbusiness/gotosocial",
+ Repository: "https://codeberg.org/superseriousbusiness/gotosocial",
Homepage: "https://docs.gotosocial.org",
},
Protocols: []string{"activitypub"},
diff --git a/testrig/util.go b/testrig/util.go
index 2e9fc31a9..b4d80fd4a 100644
--- a/testrig/util.go
+++ b/testrig/util.go
@@ -27,12 +27,12 @@ import (
"path"
"time"
+ "code.superseriousbusiness.org/gotosocial/internal/log"
+ "code.superseriousbusiness.org/gotosocial/internal/messages"
+ "code.superseriousbusiness.org/gotosocial/internal/processing/workers"
+ "code.superseriousbusiness.org/gotosocial/internal/state"
"codeberg.org/gruf/go-byteutil"
"codeberg.org/gruf/go-kv/format"
- "github.com/superseriousbusiness/gotosocial/internal/log"
- "github.com/superseriousbusiness/gotosocial/internal/messages"
- "github.com/superseriousbusiness/gotosocial/internal/processing/workers"
- "github.com/superseriousbusiness/gotosocial/internal/state"
)
// Starts workers on the provided state using noop processing functions.
diff --git a/testrig/webpush.go b/testrig/webpush.go
index 4cd5d7a81..d4752ae90 100644
--- a/testrig/webpush.go
+++ b/testrig/webpush.go
@@ -20,9 +20,9 @@ package testrig
import (
"context"
- "github.com/superseriousbusiness/gotosocial/internal/filter/usermute"
- "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/webpush"
+ "code.superseriousbusiness.org/gotosocial/internal/filter/usermute"
+ "code.superseriousbusiness.org/gotosocial/internal/gtsmodel"
+ "code.superseriousbusiness.org/gotosocial/internal/webpush"
)
// WebPushMockSender collects a map of notifications sent to each account ID.