diff options
Diffstat (limited to 'testrig')
-rw-r--r-- | testrig/db.go | 7 | ||||
-rw-r--r-- | testrig/testmodels.go | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/testrig/db.go b/testrig/db.go index faa7a910d..67a7e2439 100644 --- a/testrig/db.go +++ b/testrig/db.go @@ -56,6 +56,7 @@ var testModels = []interface{}{ >smodel.ThreadMute{}, >smodel.ThreadToStatus{}, >smodel.User{}, + >smodel.UserMute{}, >smodel.Emoji{}, >smodel.Instance{}, >smodel.Notification{}, @@ -338,6 +339,12 @@ func StandardDBSetup(db db.DB, accounts map[string]*gtsmodel.Account) { } } + for _, v := range NewTestUserMutes() { + if err := db.Put(ctx, v); err != nil { + log.Panic(nil, err) + } + } + if err := db.CreateInstanceAccount(ctx); err != nil { log.Panic(nil, err) } diff --git a/testrig/testmodels.go b/testrig/testmodels.go index 956c898c0..e1d99fed8 100644 --- a/testrig/testmodels.go +++ b/testrig/testmodels.go @@ -3392,6 +3392,11 @@ func NewTestFilterStatuses() map[string]*gtsmodel.FilterStatus { } } +func NewTestUserMutes() map[string]*gtsmodel.UserMute { + // Not currently used. + return map[string]*gtsmodel.UserMute{} +} + // GetSignatureForActivity prepares a mock HTTP request as if it were going to deliver activity to destination signed for privkey and pubKeyID, signs the request and returns the header values. func GetSignatureForActivity(activity pub.Activity, pubKeyID string, privkey *rsa.PrivateKey, destination *url.URL) (signatureHeader string, digestHeader string, dateHeader string) { // convert the activity into json bytes |