summaryrefslogtreecommitdiff
path: root/testrig
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-06-21 12:27:23 +0200
committerLibravatar GitHub <noreply@github.com>2021-06-21 12:27:23 +0200
commitefbd83918137930001f7eda62ab5805a54da7a1d (patch)
treeacccb8f0650c32044e1f7769ce4b5ebb51b80f62 /testrig
parentStreaming (#49) (diff)
downloadgotosocial-efbd83918137930001f7eda62ab5805a54da7a1d.tar.xz
Testrig fixes (#50)
* testrig is runnable again * little fixes, add some more test models * address https://github.com/superseriousbusiness/gotosocial/issues/44
Diffstat (limited to 'testrig')
-rw-r--r--testrig/actions.go127
-rw-r--r--testrig/db.go18
-rw-r--r--testrig/media/team-fortress-original.jpegbin0 -> 517226 bytes
-rw-r--r--testrig/media/team-fortress-small.jpegbin0 -> 42308 bytes
-rw-r--r--testrig/testmodels.go390
5 files changed, 252 insertions, 283 deletions
diff --git a/testrig/actions.go b/testrig/actions.go
deleted file mode 100644
index f6d506c3c..000000000
--- a/testrig/actions.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- GoToSocial
- Copyright (C) 2021 GoToSocial Authors admin@gotosocial.org
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-package testrig
-
-import (
- "bytes"
- "context"
- "fmt"
- "io/ioutil"
- "net/http"
- "os"
- "os/signal"
- "syscall"
-
- "github.com/sirupsen/logrus"
- "github.com/superseriousbusiness/gotosocial/internal/api"
- "github.com/superseriousbusiness/gotosocial/internal/api/client/account"
- "github.com/superseriousbusiness/gotosocial/internal/api/client/admin"
- "github.com/superseriousbusiness/gotosocial/internal/api/client/app"
- "github.com/superseriousbusiness/gotosocial/internal/api/client/auth"
- "github.com/superseriousbusiness/gotosocial/internal/api/client/fileserver"
- mediaModule "github.com/superseriousbusiness/gotosocial/internal/api/client/media"
- "github.com/superseriousbusiness/gotosocial/internal/api/client/status"
- "github.com/superseriousbusiness/gotosocial/internal/api/security"
- "github.com/superseriousbusiness/gotosocial/internal/cliactions"
- "github.com/superseriousbusiness/gotosocial/internal/config"
- "github.com/superseriousbusiness/gotosocial/internal/federation"
- "github.com/superseriousbusiness/gotosocial/internal/gotosocial"
-)
-
-// Run creates and starts a gotosocial testrig server
-var Run cliactions.GTSAction = func(ctx context.Context, _ *config.Config, log *logrus.Logger) error {
- c := NewTestConfig()
- dbService := NewTestDB()
- federatingDB := NewTestFederatingDB(dbService)
- router := NewTestRouter()
- storageBackend := NewTestStorage()
-
- typeConverter := NewTestTypeConverter(dbService)
- transportController := NewTestTransportController(NewMockHTTPClient(func(req *http.Request) (*http.Response, error) {
- r := ioutil.NopCloser(bytes.NewReader([]byte{}))
- return &http.Response{
- StatusCode: 200,
- Body: r,
- }, nil
- }))
- federator := federation.NewFederator(dbService, federatingDB, transportController, c, log, typeConverter)
- processor := NewTestProcessor(dbService, storageBackend, federator)
- if err := processor.Start(); err != nil {
- return fmt.Errorf("error starting processor: %s", err)
- }
-
- StandardDBSetup(dbService)
- StandardStorageSetup(storageBackend, "./testrig/media")
-
- // build client api modules
- authModule := auth.New(c, dbService, NewTestOauthServer(dbService), log)
- accountModule := account.New(c, processor, log)
- appsModule := app.New(c, processor, log)
- mm := mediaModule.New(c, processor, log)
- fileServerModule := fileserver.New(c, processor, log)
- adminModule := admin.New(c, processor, log)
- statusModule := status.New(c, processor, log)
- securityModule := security.New(c, log)
-
- apis := []api.ClientModule{
- // modules with middleware go first
- securityModule,
- authModule,
-
- // now everything else
- accountModule,
- appsModule,
- mm,
- fileServerModule,
- adminModule,
- statusModule,
- }
-
- for _, m := range apis {
- if err := m.Route(router); err != nil {
- return fmt.Errorf("routing error: %s", err)
- }
- }
-
- gts, err := gotosocial.NewServer(dbService, router, federator, c)
- if err != nil {
- return fmt.Errorf("error creating gotosocial service: %s", err)
- }
-
- if err := gts.Start(ctx); err != nil {
- return fmt.Errorf("error starting gotosocial service: %s", err)
- }
-
- // catch shutdown signals from the operating system
- sigs := make(chan os.Signal, 1)
- signal.Notify(sigs, os.Interrupt, syscall.SIGTERM)
- sig := <-sigs
- log.Infof("received signal %s, shutting down", sig)
-
- StandardDBTeardown(dbService)
- StandardStorageTeardown(storageBackend)
-
- // close down all running services in order
- if err := gts.Stop(ctx); err != nil {
- return fmt.Errorf("error closing gotosocial service: %s", err)
- }
-
- log.Info("done! exiting...")
- return nil
-}
diff --git a/testrig/db.go b/testrig/db.go
index fb4a4e6e7..5fa019adc 100644
--- a/testrig/db.go
+++ b/testrig/db.go
@@ -45,6 +45,8 @@ var testModels []interface{} = []interface{}{
&gtsmodel.Tag{},
&gtsmodel.User{},
&gtsmodel.Emoji{},
+ &gtsmodel.Instance{},
+ &gtsmodel.Notification{},
&oauth.Token{},
&oauth.Client{},
}
@@ -129,9 +131,25 @@ func StandardDBSetup(db db.DB) {
}
}
+ for _, v := range NewTestFollows() {
+ if err := db.Put(v); err != nil {
+ panic(err)
+ }
+ }
+
+ for _, v := range NewTestNotifications() {
+ if err := db.Put(v); err != nil {
+ panic(err)
+ }
+ }
+
if err := db.CreateInstanceAccount(); err != nil {
panic(err)
}
+
+ if err := db.CreateInstanceInstance(); err != nil {
+ panic(err)
+ }
}
// StandardDBTeardown drops all the standard testing tables/models from the database to ensure it's clean for the next test.
diff --git a/testrig/media/team-fortress-original.jpeg b/testrig/media/team-fortress-original.jpeg
new file mode 100644
index 000000000..9eb1803b3
--- /dev/null
+++ b/testrig/media/team-fortress-original.jpeg
Binary files differ
diff --git a/testrig/media/team-fortress-small.jpeg b/testrig/media/team-fortress-small.jpeg
new file mode 100644
index 000000000..f6773b9a0
--- /dev/null
+++ b/testrig/media/team-fortress-small.jpeg
Binary files differ
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index 90d7f63b6..0b63e0ed2 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -45,9 +45,9 @@ import (
func NewTestTokens() map[string]*oauth.Token {
tokens := map[string]*oauth.Token{
"local_account_1": {
- ID: "64cf4214-33ab-4220-b5ca-4a6a12263b20",
- ClientID: "73b48d42-029d-4487-80fc-329a5cf67869",
- UserID: "44e36b79-44a4-4bd8-91e9-097f477fe97b",
+ ID: "01F8MGTQW4DKTDF8SW5CT9HYGA",
+ ClientID: "01F8MGV8AC3NGSJW0FE8W1BV70",
+ UserID: "01F8MGVGPHQ2D3P3X0454H54Z5",
RedirectURI: "http://localhost:8080",
Scope: "read write follow push",
Access: "NZAZOTC0OWITMDU0NC0ZODG4LWE4NJITMWUXM2M4MTRHZDEX",
@@ -55,9 +55,9 @@ func NewTestTokens() map[string]*oauth.Token {
AccessExpiresAt: time.Now().Add(72 * time.Hour),
},
"local_account_2": {
- ID: "b04cae99-39b5-4610-a425-dc6b91c78a72",
- ClientID: "a4f6a2ea-a32b-4600-8853-72fc4ad98a1f",
- UserID: "d120bd97-866f-4a05-9690-a1294b9934c3",
+ ID: "01F8MGVVM1EDVYET710J27XY5R",
+ ClientID: "01F8MGW47HN8ZXNHNZ7E47CDMQ",
+ UserID: "01F8MGWAPB4GJ42M4N0TCZSQ7K",
RedirectURI: "http://localhost:8080",
Scope: "read write follow push",
Access: "PIPINALKNNNFNF98717NAMNAMNFKIJKJ881818KJKJAKJJJA",
@@ -72,22 +72,22 @@ func NewTestTokens() map[string]*oauth.Token {
func NewTestClients() map[string]*oauth.Client {
clients := map[string]*oauth.Client{
"admin_account": {
- ID: "1c5cefc8-f0c9-4307-8506-ca6e3888675e",
+ ID: "01F8MGWSJCND9BWBD4WGJXBM93",
Secret: "dda8e835-2c9c-4bd2-9b8b-77c2e26d7a7a",
Domain: "http://localhost:8080",
- UserID: "0fb02eae-2214-473f-9667-0a43f22d75ff", // admin_account
+ UserID: "01F8MGWYWKVKS3VS8DV1AMYPGE", // admin_account
},
"local_account_1": {
- ID: "73b48d42-029d-4487-80fc-329a5cf67869",
+ ID: "01F8MGV8AC3NGSJW0FE8W1BV70",
Secret: "c3724c74-dc3b-41b2-a108-0ea3d8399830",
Domain: "http://localhost:8080",
- UserID: "44e36b79-44a4-4bd8-91e9-097f477fe97b", // local_account_1
+ UserID: "01F8MGVGPHQ2D3P3X0454H54Z5", // local_account_1
},
"local_account_2": {
- ID: "a4f6a2ea-a32b-4600-8853-72fc4ad98a1f",
+ ID: "01F8MGW47HN8ZXNHNZ7E47CDMQ",
Secret: "8f5603a5-c721-46cd-8f1b-2e368f51379f",
Domain: "http://localhost:8080",
- UserID: "d120bd97-866f-4a05-9690-a1294b9934c3", // local_account_2
+ UserID: "01F8MGWAPB4GJ42M4N0TCZSQ7K", // local_account_2
},
}
return clients
@@ -97,31 +97,31 @@ func NewTestClients() map[string]*oauth.Client {
func NewTestApplications() map[string]*gtsmodel.Application {
apps := map[string]*gtsmodel.Application{
"admin_account": {
- ID: "9bf9e368-037f-444d-8ffd-1091d1c21c4c",
+ ID: "01F8MGXQRHYF5QPMTMXP78QC2F",
Name: "superseriousbusiness",
Website: "https://superserious.business",
RedirectURI: "http://localhost:8080",
- ClientID: "1c5cefc8-f0c9-4307-8506-ca6e3888675e", // admin client
+ ClientID: "01F8MGWSJCND9BWBD4WGJXBM93", // admin client
ClientSecret: "dda8e835-2c9c-4bd2-9b8b-77c2e26d7a7a", // admin client
Scopes: "read write follow push",
VapidKey: "76ae0095-8a10-438f-9f49-522d1985b190",
},
"application_1": {
- ID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
+ ID: "01F8MGY43H3N2C8EWPR2FPYEXG",
Name: "really cool gts application",
Website: "https://reallycool.app",
RedirectURI: "http://localhost:8080",
- ClientID: "73b48d42-029d-4487-80fc-329a5cf67869", // client_1
+ ClientID: "01F8MGV8AC3NGSJW0FE8W1BV70", // client_1
ClientSecret: "c3724c74-dc3b-41b2-a108-0ea3d8399830", // client_1
Scopes: "read write follow push",
VapidKey: "4738dfd7-ca73-4aa6-9aa9-80e946b7db36",
},
"application_2": {
- ID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
+ ID: "01F8MGYG9E893WRHW0TAEXR8GJ",
Name: "kindaweird",
Website: "https://kindaweird.app",
RedirectURI: "http://localhost:8080",
- ClientID: "a4f6a2ea-a32b-4600-8853-72fc4ad98a1f", // client_2
+ ClientID: "01F8MGW47HN8ZXNHNZ7E47CDMQ", // client_2
ClientSecret: "8f5603a5-c721-46cd-8f1b-2e368f51379f", // client_2
Scopes: "read write follow push",
VapidKey: "c040a5fc-e1e2-4859-bbea-0a3efbca1c4b",
@@ -134,9 +134,9 @@ func NewTestApplications() map[string]*gtsmodel.Application {
func NewTestUsers() map[string]*gtsmodel.User {
users := map[string]*gtsmodel.User{
"unconfirmed_account": {
- ID: "0f7b1d24-1e49-4ee0-bc7e-fd87b7289eea",
+ ID: "01F8MGYG9E893WRHW0TAEXR8GJ",
Email: "",
- AccountID: "59e197f5-87cd-4be8-ac7c-09082ccc4b4d",
+ AccountID: "01F8MH0BBE4FHXPH513MBVFHB0",
EncryptedPassword: "$2y$10$ggWz5QWwnx6kzb9g0tnIJurFtE0dhr5Zfeaqs9iFuUIXzafQlJVZS", // 'password'
CreatedAt: time.Now(),
SignUpIP: net.ParseIP("199.222.111.89"),
@@ -164,9 +164,9 @@ func NewTestUsers() map[string]*gtsmodel.User {
ResetPasswordSentAt: time.Time{},
},
"admin_account": {
- ID: "0fb02eae-2214-473f-9667-0a43f22d75ff",
+ ID: "01F8MGWYWKVKS3VS8DV1AMYPGE",
Email: "admin@example.org",
- AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
+ AccountID: "01F8MH17FWEB39HZJ76B6VXSKF",
EncryptedPassword: "$2y$10$ggWz5QWwnx6kzb9g0tnIJurFtE0dhr5Zfeaqs9iFuUIXzafQlJVZS", // 'password'
CreatedAt: time.Now().Add(-72 * time.Hour),
SignUpIP: net.ParseIP("89.22.189.19"),
@@ -194,9 +194,9 @@ func NewTestUsers() map[string]*gtsmodel.User {
ResetPasswordSentAt: time.Time{},
},
"local_account_1": {
- ID: "44e36b79-44a4-4bd8-91e9-097f477fe97b",
+ ID: "01F8MGVGPHQ2D3P3X0454H54Z5",
Email: "zork@example.org",
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
EncryptedPassword: "$2y$10$ggWz5QWwnx6kzb9g0tnIJurFtE0dhr5Zfeaqs9iFuUIXzafQlJVZS", // 'password'
CreatedAt: time.Now().Add(-36 * time.Hour),
SignUpIP: net.ParseIP("59.99.19.172"),
@@ -210,7 +210,7 @@ func NewTestUsers() map[string]*gtsmodel.User {
ChosenLanguages: []string{"en"},
FilteredLanguages: []string{},
Locale: "en",
- CreatedByApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
+ CreatedByApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
LastEmailedAt: time.Now().Add(-55 * time.Minute),
ConfirmationToken: "",
ConfirmedAt: time.Now().Add(-34 * time.Hour),
@@ -224,9 +224,9 @@ func NewTestUsers() map[string]*gtsmodel.User {
ResetPasswordSentAt: time.Time{},
},
"local_account_2": {
- ID: "f8d6272e-2d71-4d0c-97d3-2ba7a0b75bf7",
+ ID: "01F8MH1VYJAE00TVVGMM5JNJ8X",
Email: "tortle.dude@example.org",
- AccountID: "eecaad73-5703-426d-9312-276641daa31e",
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
EncryptedPassword: "$2y$10$ggWz5QWwnx6kzb9g0tnIJurFtE0dhr5Zfeaqs9iFuUIXzafQlJVZS", // 'password'
CreatedAt: time.Now().Add(-36 * time.Hour),
SignUpIP: net.ParseIP("59.99.19.172"),
@@ -262,11 +262,11 @@ func NewTestUsers() map[string]*gtsmodel.User {
func NewTestAccounts() map[string]*gtsmodel.Account {
accounts := map[string]*gtsmodel.Account{
"instance_account": {
- ID: "39b745a3-774d-4b65-8bb2-b63d9e20a343",
+ ID: "01F8MH261H1KSV3GW3016GZRY3",
Username: "localhost:8080",
},
"unconfirmed_account": {
- ID: "59e197f5-87cd-4be8-ac7c-09082ccc4b4d",
+ ID: "01F8MH0BBE4FHXPH513MBVFHB0",
Username: "weed_lord420",
AvatarMediaAttachmentID: "",
HeaderMediaAttachmentID: "",
@@ -304,7 +304,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account {
SuspensionOrigin: "",
},
"admin_account": {
- ID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
+ ID: "01F8MH17FWEB39HZJ76B6VXSKF",
Username: "admin",
AvatarMediaAttachmentID: "",
HeaderMediaAttachmentID: "",
@@ -342,10 +342,10 @@ func NewTestAccounts() map[string]*gtsmodel.Account {
SuspensionOrigin: "",
},
"local_account_1": {
- ID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ ID: "01F8MH1H7YV1Z7D2C8K2730QBF",
Username: "the_mighty_zork",
- AvatarMediaAttachmentID: "a849906f-8b8e-4b43-ac2f-6979ccbcd442",
- HeaderMediaAttachmentID: "",
+ AvatarMediaAttachmentID: "01F8MH58A357CV5K7R7TJMSH6S",
+ HeaderMediaAttachmentID: "01PFPMWK2FF0D9WMHEJHR07C3Q",
DisplayName: "original zork (he/they)",
Fields: []gtsmodel.Field{},
Note: "hey yo this is my profile!",
@@ -380,7 +380,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account {
SuspensionOrigin: "",
},
"local_account_2": {
- ID: "eecaad73-5703-426d-9312-276641daa31e",
+ ID: "01F8MH5NBDF2MV7CTC4Q5128HF",
Username: "1happyturtle",
AvatarMediaAttachmentID: "",
HeaderMediaAttachmentID: "",
@@ -418,19 +418,9 @@ func NewTestAccounts() map[string]*gtsmodel.Account {
SuspensionOrigin: "",
},
"remote_account_1": {
- ID: "c2c6e647-e2a9-4286-883b-e4a188186664",
- Username: "foss_satan",
- Domain: "fossbros-anonymous.io",
- // AvatarFileName: "http://localhost:8080/fileserver/media/eecaad73-5703-426d-9312-276641daa31e/avatar/original/d5e7c265-91a6-4d84-8c27-7e1efe5720da.jpeg",
- // AvatarContentType: "image/jpeg",
- // AvatarFileSize: 0,
- // AvatarUpdatedAt: time.Time{},
- // AvatarRemoteURL: "",
- // HeaderFileName: "http://localhost:8080/fileserver/media/eecaad73-5703-426d-9312-276641daa31e/header/original/e75d4117-21b6-4315-a428-eb3944235996.jpeg",
- // HeaderContentType: "image/jpeg",
- // HeaderFileSize: 0,
- // HeaderUpdatedAt: time.Time{},
- // HeaderRemoteURL: "",
+ ID: "01F8MH5ZK5VRH73AKHQM6Y9VNX",
+ Username: "foss_satan",
+ Domain: "fossbros-anonymous.io",
DisplayName: "big gerald",
Fields: []gtsmodel.Field{},
Note: "i post about like, i dunno, stuff, or whatever!!!!",
@@ -462,20 +452,6 @@ func NewTestAccounts() map[string]*gtsmodel.Account {
HideCollections: false,
SuspensionOrigin: "",
},
- // "remote_account_2": {
- // ID: "93287988-76c4-460f-9e68-a45b578bb6b2",
- // Username: "dailycatpics",
- // Domain: "uwu.social",
- // },
- // "suspended_local_account": {
- // ID: "e8a5cf4e-4b10-45a4-ad82-b6e37a09100d",
- // Username: "jeffbadman",
- // },
- // "suspended_remote_account": {
- // ID: "17e6e09e-855d-4bf8-a1c3-7e780269f215",
- // Username: "ipfreely",
- // Domain: "a-very-bad-website.com",
- // },
}
// generate keys for each account
@@ -500,9 +476,9 @@ func NewTestAccounts() map[string]*gtsmodel.Account {
func NewTestAttachments() map[string]*gtsmodel.MediaAttachment {
return map[string]*gtsmodel.MediaAttachment{
"admin_account_status_1_attachment_1": {
- ID: "b052241b-f30f-4dc6-92fc-2bad0be1f8d8",
- StatusID: "502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
- URL: "http://localhost:8080/fileserver/8020dbb4-1e7b-4d99-a872-4cf94e64210f/attachment/original/b052241b-f30f-4dc6-92fc-2bad0be1f8d8.jpeg",
+ ID: "01F8MH6NEM8D7527KZAECTCR76",
+ StatusID: "01F8MH75CBF9JFX4ZAD54N0W0R",
+ URL: "http://localhost:8080/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/attachment/original/01F8MH6NEM8D7527KZAECTCR76.jpeg",
RemoteURL: "",
CreatedAt: time.Now().Add(-71 * time.Hour),
UpdatedAt: time.Now().Add(-71 * time.Hour),
@@ -521,32 +497,32 @@ func NewTestAttachments() map[string]*gtsmodel.MediaAttachment {
Aspect: 1.9104477611940298,
},
},
- AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
+ AccountID: "01F8MH17FWEB39HZJ76B6VXSKF",
Description: "Black and white image of some 50's style text saying: Welcome On Board",
ScheduledStatusID: "",
Blurhash: "LNJRdVM{00Rj%Mayt7j[4nWBofRj",
Processing: 2,
File: gtsmodel.File{
- Path: "/gotosocial/storage/8020dbb4-1e7b-4d99-a872-4cf94e64210f/attachment/original/b052241b-f30f-4dc6-92fc-2bad0be1f8d8.jpeg",
+ Path: "/gotosocial/storage/01F8MH17FWEB39HZJ76B6VXSKF/attachment/original/01F8MH6NEM8D7527KZAECTCR76.jpeg",
ContentType: "image/jpeg",
FileSize: 62529,
UpdatedAt: time.Now().Add(-71 * time.Hour),
},
Thumbnail: gtsmodel.Thumbnail{
- Path: "/gotosocial/storage/8020dbb4-1e7b-4d99-a872-4cf94e64210f/attachment/small/b052241b-f30f-4dc6-92fc-2bad0be1f8d8.jpeg",
+ Path: "/gotosocial/storage/01F8MH17FWEB39HZJ76B6VXSKF/attachment/small/01F8MH6NEM8D7527KZAECTCR76.jpeg",
ContentType: "image/jpeg",
FileSize: 6872,
UpdatedAt: time.Now().Add(-71 * time.Hour),
- URL: "http://localhost:8080/fileserver/8020dbb4-1e7b-4d99-a872-4cf94e64210f/attachment/small/b052241b-f30f-4dc6-92fc-2bad0be1f8d8.jpeg",
+ URL: "http://localhost:8080/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/attachment/small/01F8MH6NEM8D7527KZAECTCR76.jpeg",
RemoteURL: "",
},
Avatar: false,
Header: false,
},
"local_account_1_status_4_attachment_1": {
- ID: "510f6033-798b-4390-81b1-c38ca2205ad3",
- StatusID: "18524c05-97dc-46d7-b474-c811bd9e1e32",
- URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/original/510f6033-798b-4390-81b1-c38ca2205ad3.gif",
+ ID: "01F8MH7TDVANYKWVE8VVKFPJTJ",
+ StatusID: "01F8MH82FYRXD2RC6108DAJ5HB",
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/original/01F8MH7TDVANYKWVE8VVKFPJTJ.gif",
RemoteURL: "",
CreatedAt: time.Now().Add(-1 * time.Hour),
UpdatedAt: time.Now().Add(-1 * time.Hour),
@@ -569,32 +545,32 @@ func NewTestAttachments() map[string]*gtsmodel.MediaAttachment {
Y: 0,
},
},
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
Description: "90's Trent Reznor turning to the camera",
ScheduledStatusID: "",
Blurhash: "LEDara58O=t5EMSOENEN9]}?aK%0",
Processing: 2,
File: gtsmodel.File{
- Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/original/510f6033-798b-4390-81b1-c38ca2205ad3.gif",
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/original/01F8MH7TDVANYKWVE8VVKFPJTJ.gif",
ContentType: "image/gif",
FileSize: 1109138,
UpdatedAt: time.Now().Add(-1 * time.Hour),
},
Thumbnail: gtsmodel.Thumbnail{
- Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/small/510f6033-798b-4390-81b1-c38ca2205ad3.jpeg",
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/small/01F8MH7TDVANYKWVE8VVKFPJTJ.jpeg",
ContentType: "image/jpeg",
FileSize: 8803,
UpdatedAt: time.Now().Add(-1 * time.Hour),
- URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/small/510f6033-798b-4390-81b1-c38ca2205ad3.jpeg",
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/small/01F8MH7TDVANYKWVE8VVKFPJTJ.jpeg",
RemoteURL: "",
},
Avatar: false,
Header: false,
},
"local_account_1_unattached_1": {
- ID: "7a3b9f77-ab30-461e-bdd8-e64bd1db3008",
+ ID: "01F8MH8RMYQ6MSNY3JM2XT1CQ5",
StatusID: "", // this attachment isn't connected to a status YET
- URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/original/7a3b9f77-ab30-461e-bdd8-e64bd1db3008.jpeg",
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/original/01F8MH8RMYQ6MSNY3JM2XT1CQ5.jpeg",
RemoteURL: "",
CreatedAt: time.Now().Add(30 * time.Second),
UpdatedAt: time.Now().Add(30 * time.Second),
@@ -617,35 +593,35 @@ func NewTestAttachments() map[string]*gtsmodel.MediaAttachment {
Y: 0,
},
},
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
Description: "the oh you meme",
ScheduledStatusID: "",
Blurhash: "LSAd]9ogDge-R:M|j=xWIto0xXWX",
Processing: 2,
File: gtsmodel.File{
- Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/original/7a3b9f77-ab30-461e-bdd8-e64bd1db3008.jpeg",
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/original/01F8MH8RMYQ6MSNY3JM2XT1CQ5.jpeg",
ContentType: "image/jpeg",
FileSize: 27759,
UpdatedAt: time.Now().Add(30 * time.Second),
},
Thumbnail: gtsmodel.Thumbnail{
- Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/small/7a3b9f77-ab30-461e-bdd8-e64bd1db3008.jpeg",
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/small/01F8MH8RMYQ6MSNY3JM2XT1CQ5.jpeg",
ContentType: "image/jpeg",
FileSize: 6177,
UpdatedAt: time.Now().Add(30 * time.Second),
- URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/attachment/small/7a3b9f77-ab30-461e-bdd8-e64bd1db3008.jpeg",
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/attachment/small/01F8MH8RMYQ6MSNY3JM2XT1CQ5.jpeg",
RemoteURL: "",
},
Avatar: false,
Header: false,
},
"local_account_1_avatar": {
- ID: "a849906f-8b8e-4b43-ac2f-6979ccbcd442",
+ ID: "01F8MH58A357CV5K7R7TJMSH6S",
StatusID: "", // this attachment isn't connected to a status
- URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/original/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/original/01F8MH58A357CV5K7R7TJMSH6S.jpeg",
RemoteURL: "",
- CreatedAt: time.Now().Add(47 * time.Hour),
- UpdatedAt: time.Now().Add(47 * time.Hour),
+ CreatedAt: time.Now().Add(-47 * time.Hour),
+ UpdatedAt: time.Now().Add(-47 * time.Hour),
Type: gtsmodel.FileTypeImage,
FileMeta: gtsmodel.FileMeta{
Original: gtsmodel.Original{
@@ -665,28 +641,76 @@ func NewTestAttachments() map[string]*gtsmodel.MediaAttachment {
Y: 0,
},
},
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
Description: "a green goblin looking nasty",
ScheduledStatusID: "",
Blurhash: "LKK9MT,p|YSNDkJ-5rsmvnwcOoe:",
Processing: 2,
File: gtsmodel.File{
- Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/original/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/original/01F8MH58A357CV5K7R7TJMSH6S.jpeg",
ContentType: "image/jpeg",
FileSize: 457680,
- UpdatedAt: time.Now().Add(47 * time.Hour),
+ UpdatedAt: time.Now().Add(-47 * time.Hour),
},
Thumbnail: gtsmodel.Thumbnail{
- Path: "/gotosocial/storage/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/small/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/small/01F8MH58A357CV5K7R7TJMSH6S.jpeg",
ContentType: "image/jpeg",
FileSize: 15374,
- UpdatedAt: time.Now().Add(47 * time.Hour),
- URL: "http://localhost:8080/fileserver/580072df-4d03-4684-a412-89fd6f7d77e6/avatar/small/a849906f-8b8e-4b43-ac2f-6979ccbcd442.jpeg",
+ UpdatedAt: time.Now().Add(-47 * time.Hour),
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/small/01F8MH58A357CV5K7R7TJMSH6S.jpeg",
RemoteURL: "",
},
Avatar: true,
Header: false,
},
+ "local_account_1_header": {
+ ID: "01PFPMWK2FF0D9WMHEJHR07C3Q",
+ StatusID: "",
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/original/01PFPMWK2FF0D9WMHEJHR07C3Q.jpeg",
+ RemoteURL: "",
+ CreatedAt: time.Now().Add(-47 * time.Hour),
+ UpdatedAt: time.Now().Add(-47 * time.Hour),
+ Type: gtsmodel.FileTypeImage,
+ FileMeta: gtsmodel.FileMeta{
+ Original: gtsmodel.Original{
+ Width: 1018,
+ Height: 764,
+ Size: 777752,
+ Aspect: 1.3324607329842932,
+ },
+ Small: gtsmodel.Small{
+ Width: 256,
+ Height: 192,
+ Size: 49152,
+ Aspect: 1.3333333333333333,
+ },
+ Focus: gtsmodel.Focus{
+ X: 0,
+ Y: 0,
+ },
+ },
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
+ Description: "A very old-school screenshot of the original team fortress mod for quake ",
+ ScheduledStatusID: "",
+ Blurhash: "L26j{^WCs+R-N}jsxWj@4;WWxDoK",
+ Processing: 2,
+ File: gtsmodel.File{
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/header/original/01PFPMWK2FF0D9WMHEJHR07C3Q.jpeg",
+ ContentType: "image/jpeg",
+ FileSize: 517226,
+ UpdatedAt: time.Now().Add(-47 * time.Hour),
+ },
+ Thumbnail: gtsmodel.Thumbnail{
+ Path: "/gotosocial/storage/01F8MH1H7YV1Z7D2C8K2730QBF/header/small/01PFPMWK2FF0D9WMHEJHR07C3Q.jpeg",
+ ContentType: "image/jpeg",
+ FileSize: 42308,
+ UpdatedAt: time.Now().Add(-47 * time.Hour),
+ URL: "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/small/01PFPMWK2FF0D9WMHEJHR07C3Q.jpeg",
+ RemoteURL: "",
+ },
+ Avatar: false,
+ Header: true,
+ },
}
}
@@ -694,24 +718,24 @@ func NewTestAttachments() map[string]*gtsmodel.MediaAttachment {
func NewTestEmojis() map[string]*gtsmodel.Emoji {
return map[string]*gtsmodel.Emoji{
"rainbow": {
- ID: "a96ec4f3-1cae-47e4-a508-f9d66a6b221b",
+ ID: "01F8MH9H8E4VG3KDYJR9EGPXCQ",
Shortcode: "rainbow",
Domain: "",
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
ImageRemoteURL: "",
ImageStaticRemoteURL: "",
- ImageURL: "http://localhost:8080/fileserver/39b745a3-774d-4b65-8bb2-b63d9e20a343/emoji/original/a96ec4f3-1cae-47e4-a508-f9d66a6b221b.png",
- ImagePath: "/tmp/gotosocial/39b745a3-774d-4b65-8bb2-b63d9e20a343/emoji/original/a96ec4f3-1cae-47e4-a508-f9d66a6b221b.png",
- ImageStaticURL: "http://localhost:8080/fileserver/39b745a3-774d-4b65-8bb2-b63d9e20a343/emoji/static/a96ec4f3-1cae-47e4-a508-f9d66a6b221b.png",
- ImageStaticPath: "/tmp/gotosocial/39b745a3-774d-4b65-8bb2-b63d9e20a343/emoji/static/a96ec4f3-1cae-47e4-a508-f9d66a6b221b.png",
+ ImageURL: "http://localhost:8080/fileserver/01F8MH261H1KSV3GW3016GZRY3/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png",
+ ImagePath: "/tmp/gotosocial/01F8MH261H1KSV3GW3016GZRY3/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png",
+ ImageStaticURL: "http://localhost:8080/fileserver/01F8MH261H1KSV3GW3016GZRY3/emoji/static/01F8MH9H8E4VG3KDYJR9EGPXCQ.png",
+ ImageStaticPath: "/tmp/gotosocial/01F8MH261H1KSV3GW3016GZRY3/emoji/static/01F8MH9H8E4VG3KDYJR9EGPXCQ.png",
ImageContentType: "image/png",
ImageStaticContentType: "image/png",
ImageFileSize: 36702,
ImageStaticFileSize: 10413,
ImageUpdatedAt: time.Now(),
Disabled: false,
- URI: "http://localhost:8080/emoji/a96ec4f3-1cae-47e4-a508-f9d66a6b221b",
+ URI: "http://localhost:8080/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ",
VisibleInPicker: true,
CategoryID: "",
},
@@ -743,6 +767,10 @@ func newTestStoredAttachments() map[string]filenames {
Original: "zork-original.jpeg",
Small: "zork-small.jpeg",
},
+ "local_account_1_header": {
+ Original: "team-fortress-original.jpeg",
+ Small: "team-fortress-small.jpeg",
+ },
}
}
@@ -761,25 +789,25 @@ func newTestStoredEmoji() map[string]filenames {
func NewTestStatuses() map[string]*gtsmodel.Status {
return map[string]*gtsmodel.Status{
"admin_account_status_1": {
- ID: "502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
- URI: "http://localhost:8080/users/admin/statuses/502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
- URL: "http://localhost:8080/@admin/statuses/502ccd6f-0edf-48d7-9016-2dfa4d3714cd",
+ ID: "01F8MH75CBF9JFX4ZAD54N0W0R",
+ URI: "http://localhost:8080/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R",
+ URL: "http://localhost:8080/@admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R",
Content: "hello world! #welcome ! first post on the instance :rainbow: !",
- Attachments: []string{"b052241b-f30f-4dc6-92fc-2bad0be1f8d8"},
- Tags: []string{"a7e8f5ca-88a1-4652-8079-a187eab8d56e"},
+ Attachments: []string{"01F8MH6NEM8D7527KZAECTCR76"},
+ Tags: []string{"01F8MHA1A2NF9MJ3WCCQ3K8BSZ"},
Mentions: []string{},
- Emojis: []string{"a96ec4f3-1cae-47e4-a508-f9d66a6b221b"},
+ Emojis: []string{"01F8MH9H8E4VG3KDYJR9EGPXCQ"},
CreatedAt: time.Now().Add(-71 * time.Hour),
UpdatedAt: time.Now().Add(-71 * time.Hour),
Local: true,
- AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
+ AccountID: "01F8MH17FWEB39HZJ76B6VXSKF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "",
Visibility: gtsmodel.VisibilityPublic,
Sensitive: false,
Language: "en",
- CreatedWithApplicationID: "9bf9e368-037f-444d-8ffd-1091d1c21c4c",
+ CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: true,
@@ -789,21 +817,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"admin_account_status_2": {
- ID: "0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
- URI: "http://localhost:8080/users/admin/statuses/0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
- URL: "http://localhost:8080/@admin/statuses/0fb3f1ac-5cd8-48ac-9050-3d95dc7e44e9",
+ ID: "01F8MHAAY43M6RJ473VQFCVH37",
+ URI: "http://localhost:8080/users/admin/statuses/01F8MHAAY43M6RJ473VQFCVH37",
+ URL: "http://localhost:8080/@admin/statuses/01F8MHAAY43M6RJ473VQFCVH37",
Content: "🐕🐕🐕🐕🐕",
CreatedAt: time.Now().Add(-70 * time.Hour),
UpdatedAt: time.Now().Add(-70 * time.Hour),
Local: true,
- AccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f",
+ AccountID: "01F8MH17FWEB39HZJ76B6VXSKF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "open to see some puppies",
Visibility: gtsmodel.VisibilityPublic,
Sensitive: true,
Language: "en",
- CreatedWithApplicationID: "9bf9e368-037f-444d-8ffd-1091d1c21c4c",
+ CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: true,
@@ -813,21 +841,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_1_status_1": {
- ID: "91b1e795-74ff-4672-a4c4-476616710e2d",
- URI: "http://localhost:8080/users/the_mighty_zork/statuses/91b1e795-74ff-4672-a4c4-476616710e2d",
- URL: "http://localhost:8080/@the_mighty_zork/statuses/91b1e795-74ff-4672-a4c4-476616710e2d",
+ ID: "01F8MHAMCHF6Y650WCRSCP4WMY",
+ URI: "http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAMCHF6Y650WCRSCP4WMY",
+ URL: "http://localhost:8080/@the_mighty_zork/statuses/01F8MHAMCHF6Y650WCRSCP4WMY",
Content: "hello everyone!",
CreatedAt: time.Now().Add(-47 * time.Hour),
UpdatedAt: time.Now().Add(-47 * time.Hour),
Local: true,
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "introduction post",
Visibility: gtsmodel.VisibilityPublic,
Sensitive: true,
Language: "en",
- CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
+ CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: true,
@@ -837,21 +865,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_1_status_2": {
- ID: "3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
- URI: "http://localhost:8080/users/the_mighty_zork/statuses/3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
- URL: "http://localhost:8080/@the_mighty_zork/statuses/3dd328d9-8bb1-48f5-bc96-5ccc1c696b4c",
+ ID: "01F8MHAYFKS4KMXF8K5Y1C0KRN",
+ URI: "http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAYFKS4KMXF8K5Y1C0KRN",
+ URL: "http://localhost:8080/@the_mighty_zork/statuses/01F8MHAYFKS4KMXF8K5Y1C0KRN",
Content: "this is an unlocked local-only post that shouldn't federate, but it's still boostable, replyable, and likeable",
CreatedAt: time.Now().Add(-46 * time.Hour),
UpdatedAt: time.Now().Add(-46 * time.Hour),
Local: true,
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "",
Visibility: gtsmodel.VisibilityUnlocked,
Sensitive: false,
Language: "en",
- CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
+ CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: false,
Boostable: true,
@@ -861,21 +889,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_1_status_3": {
- ID: "5e41963f-8ab9-4147-9f00-52d56e19da65",
- URI: "http://localhost:8080/users/the_mighty_zork/statuses/5e41963f-8ab9-4147-9f00-52d56e19da65",
- URL: "http://localhost:8080/@the_mighty_zork/statuses/5e41963f-8ab9-4147-9f00-52d56e19da65",
+ ID: "01F8MHBBN8120SYH7D5S050MGK",
+ URI: "http://localhost:8080/users/the_mighty_zork/statuses/01F8MHBBN8120SYH7D5S050MGK",
+ URL: "http://localhost:8080/@the_mighty_zork/statuses/01F8MHBBN8120SYH7D5S050MGK",
Content: "this is a very personal post that I don't want anyone to interact with at all, and i only want mutuals to see it",
CreatedAt: time.Now().Add(-45 * time.Hour),
UpdatedAt: time.Now().Add(-45 * time.Hour),
Local: true,
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "test: you shouldn't be able to interact with this post in any way",
Visibility: gtsmodel.VisibilityMutualsOnly,
Sensitive: false,
Language: "en",
- CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
+ CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: false,
@@ -885,22 +913,22 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_1_status_4": {
- ID: "18524c05-97dc-46d7-b474-c811bd9e1e32",
- URI: "http://localhost:8080/users/the_mighty_zork/statuses/18524c05-97dc-46d7-b474-c811bd9e1e32",
- URL: "http://localhost:8080/@the_mighty_zork/statuses/18524c05-97dc-46d7-b474-c811bd9e1e32",
+ ID: "01F8MH82FYRXD2RC6108DAJ5HB",
+ URI: "http://localhost:8080/users/the_mighty_zork/statuses/01F8MH82FYRXD2RC6108DAJ5HB",
+ URL: "http://localhost:8080/@the_mighty_zork/statuses/01F8MH82FYRXD2RC6108DAJ5HB",
Content: "here's a little gif of trent",
- Attachments: []string{"510f6033-798b-4390-81b1-c38ca2205ad3"},
+ Attachments: []string{"01F8MH7TDVANYKWVE8VVKFPJTJ"},
CreatedAt: time.Now().Add(-1 * time.Hour),
UpdatedAt: time.Now().Add(-1 * time.Hour),
Local: true,
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6",
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "eye contact, trent reznor gif",
Visibility: gtsmodel.VisibilityMutualsOnly,
Sensitive: false,
Language: "en",
- CreatedWithApplicationID: "f88697b8-ee3d-46c2-ac3f-dbb85566c3cc",
+ CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: true,
@@ -910,21 +938,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_2_status_1": {
- ID: "8945ccf2-3873-45e9-aa13-fd7163f19775",
- URI: "http://localhost:8080/users/1happyturtle/statuses/8945ccf2-3873-45e9-aa13-fd7163f19775",
- URL: "http://localhost:8080/@1happyturtle/statuses/8945ccf2-3873-45e9-aa13-fd7163f19775",
+ ID: "01F8MHBQCBTDKN6X5VHGMMN4MA",
+ URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHBQCBTDKN6X5VHGMMN4MA",
+ URL: "http://localhost:8080/@1happyturtle/statuses/01F8MHBQCBTDKN6X5VHGMMN4MA",
Content: "🐢 hi everyone i post about turtles 🐢",
CreatedAt: time.Now().Add(-189 * time.Hour),
UpdatedAt: time.Now().Add(-189 * time.Hour),
Local: true,
- AccountID: "eecaad73-5703-426d-9312-276641daa31e",
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "introduction post",
Visibility: gtsmodel.VisibilityPublic,
Sensitive: true,
Language: "en",
- CreatedWithApplicationID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
+ CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: true,
@@ -934,21 +962,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_2_status_2": {
- ID: "c7e25a86-f0d3-4705-a73c-c597f687d3dd",
- URI: "http://localhost:8080/users/1happyturtle/statuses/c7e25a86-f0d3-4705-a73c-c597f687d3dd",
- URL: "http://localhost:8080/@1happyturtle/statuses/c7e25a86-f0d3-4705-a73c-c597f687d3dd",
+ ID: "01F8MHC0H0A7XHTVH5F596ZKBM",
+ URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHC0H0A7XHTVH5F596ZKBM",
+ URL: "http://localhost:8080/@1happyturtle/statuses/01F8MHC0H0A7XHTVH5F596ZKBM",
Content: "🐢 this one is federated, likeable, and boostable but not replyable 🐢",
CreatedAt: time.Now().Add(-1 * time.Minute),
UpdatedAt: time.Now().Add(-1 * time.Minute),
Local: true,
- AccountID: "eecaad73-5703-426d-9312-276641daa31e",
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "",
Visibility: gtsmodel.VisibilityPublic,
Sensitive: true,
Language: "en",
- CreatedWithApplicationID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
+ CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: true,
@@ -958,21 +986,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_2_status_3": {
- ID: "75960e30-7a8e-4f45-87fa-440a4d1c9572",
- URI: "http://localhost:8080/users/1happyturtle/statuses/75960e30-7a8e-4f45-87fa-440a4d1c9572",
- URL: "http://localhost:8080/@1happyturtle/statuses/75960e30-7a8e-4f45-87fa-440a4d1c9572",
+ ID: "01F8MHC8VWDRBQR0N1BATDDEM5",
+ URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHC8VWDRBQR0N1BATDDEM5",
+ URL: "http://localhost:8080/@1happyturtle/statuses/01F8MHC8VWDRBQR0N1BATDDEM5",
Content: "🐢 i don't mind people sharing this one but I don't want likes or replies to it because cba🐢",
CreatedAt: time.Now().Add(-2 * time.Minute),
UpdatedAt: time.Now().Add(-2 * time.Minute),
Local: true,
- AccountID: "eecaad73-5703-426d-9312-276641daa31e",
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "you won't be able to like or reply to this",
Visibility: gtsmodel.VisibilityUnlocked,
Sensitive: true,
Language: "en",
- CreatedWithApplicationID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
+ CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: true,
Boostable: true,
@@ -982,21 +1010,21 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
},
"local_account_2_status_4": {
- ID: "57e41a35-20da-4bc9-9cfd-db2089f924db",
- URI: "http://localhost:8080/users/1happyturtle/statuses/57e41a35-20da-4bc9-9cfd-db2089f924db",
- URL: "http://localhost:8080/@1happyturtle/statuses/57e41a35-20da-4bc9-9cfd-db2089f924db",
+ ID: "01F8MHCP5P2NWYQ416SBA0XSEV",
+ URI: "http://localhost:8080/users/1happyturtle/statuses/01F8MHCP5P2NWYQ416SBA0XSEV",
+ URL: "http://localhost:8080/@1happyturtle/statuses/01F8MHCP5P2NWYQ416SBA0XSEV",
Content: "🐢 this is a public status but I want it local only and not boostable 🐢",
CreatedAt: time.Now().Add(-1 * time.Minute),
UpdatedAt: time.Now().Add(-1 * time.Minute),
Local: true,
- AccountID: "eecaad73-5703-426d-9312-276641daa31e",
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
InReplyToID: "",
BoostOfID: "",
ContentWarning: "",
Visibility: gtsmodel.VisibilityPublic,
Sensitive: true,
Language: "en",
- CreatedWithApplicationID: "6b0cd164-8497-4cd5-bec9-957886fac5df",
+ CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
VisibilityAdvanced: &gtsmodel.VisibilityAdvanced{
Federated: false,
Boostable: false,
@@ -1012,7 +1040,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
func NewTestTags() map[string]*gtsmodel.Tag {
return map[string]*gtsmodel.Tag{
"welcome": {
- ID: "a7e8f5ca-88a1-4652-8079-a187eab8d56e",
+ ID: "01F8MHA1A2NF9MJ3WCCQ3K8BSZ",
Name: "welcome",
FirstSeenFromAccountID: "",
CreatedAt: time.Now().Add(-71 * time.Hour),
@@ -1028,11 +1056,61 @@ func NewTestTags() map[string]*gtsmodel.Tag {
func NewTestFaves() map[string]*gtsmodel.StatusFave {
return map[string]*gtsmodel.StatusFave{
"local_account_1_admin_account_status_1": {
- ID: "fc4d42ef-631c-4125-bd9d-88695131284c",
+ ID: "01F8MHD2QCZSZ6WQS2ATVPEYJ9",
CreatedAt: time.Now().Add(-47 * time.Hour),
- AccountID: "580072df-4d03-4684-a412-89fd6f7d77e6", // local account 1
- TargetAccountID: "8020dbb4-1e7b-4d99-a872-4cf94e64210f", // admin account
- StatusID: "502ccd6f-0edf-48d7-9016-2dfa4d3714cd", // admin account status 1
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF", // local account 1
+ TargetAccountID: "01F8MH17FWEB39HZJ76B6VXSKF", // admin account
+ StatusID: "01F8MH75CBF9JFX4ZAD54N0W0R", // admin account status 1
+ URI: "http://localhost:8080/users/the_mighty_zork/liked/01F8MHD2QCZSZ6WQS2ATVPEYJ9",
+ },
+ "admin_account_local_account_1_status_1": {
+ ID: "01F8Q0486ANTDWKG02A7DS1Q24",
+ CreatedAt: time.Now().Add(-46 * time.Hour),
+ AccountID: "01F8MH17FWEB39HZJ76B6VXSKF", // admin account
+ TargetAccountID: "01F8MH1H7YV1Z7D2C8K2730QBF", // local account 1
+ StatusID: "01F8MHAMCHF6Y650WCRSCP4WMY", // local account status 1
+ URI: "http://localhost:8080/users/admin/liked/01F8Q0486ANTDWKG02A7DS1Q24",
+ },
+ }
+}
+
+// NewTestNotifications returns some notifications for use in testing.
+func NewTestNotifications() map[string]*gtsmodel.Notification {
+ return map[string]*gtsmodel.Notification{
+ "local_account_1_like": {
+ ID: "01F8Q0ANPTWW10DAKTX7BRPBJP",
+ NotificationType: gtsmodel.NotificationFave,
+ CreatedAt: time.Now().Add(-46 * time.Hour),
+ TargetAccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
+ OriginAccountID: "01F8MH17FWEB39HZJ76B6VXSKF",
+ StatusID: "01F8MHAMCHF6Y650WCRSCP4WMY",
+ Read: false,
+ },
+ }
+}
+
+// NewTestFollows returns some follows for use in testing.
+func NewTestFollows() map[string]*gtsmodel.Follow {
+ return map[string]*gtsmodel.Follow{
+ "local_account_1_admin_account": {
+ ID: "01F8PY8RHWRQZV038T4E8T9YK8",
+ CreatedAt: time.Now().Add(-46 * time.Hour),
+ UpdatedAt: time.Now().Add(-46 * time.Hour),
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
+ TargetAccountID: "01F8MH17FWEB39HZJ76B6VXSKF",
+ ShowReblogs: true,
+ URI: "http://localhost:8080/users/the_mighty_zork/follow/01F8PY8RHWRQZV038T4E8T9YK8",
+ Notify: false,
+ },
+ "local_account_1_local_account_2": {
+ ID: "01F8PYDCE8XE23GRE5DPZJDZDP",
+ CreatedAt: time.Now().Add(-1 * time.Hour),
+ UpdatedAt: time.Now().Add(-1 * time.Hour),
+ AccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
+ TargetAccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
+ ShowReblogs: true,
+ URI: "http://localhost:8080/users/the_mighty_zork/follow/01F8PYDCE8XE23GRE5DPZJDZDP",
+ Notify: false,
},
}
}