testrig is runnable again

This commit is contained in:
tsmethurst
2021-06-20 13:28:45 +02:00
parent aa8a0d0850
commit 152bd32749
4 changed files with 187 additions and 202 deletions

View File

@ -45,6 +45,8 @@ var testModels []interface{} = []interface{}{
&gtsmodel.Tag{},
&gtsmodel.User{},
&gtsmodel.Emoji{},
&gtsmodel.Instance{},
&gtsmodel.Notification{},
&oauth.Token{},
&oauth.Client{},
}
@ -132,6 +134,10 @@ func StandardDBSetup(db db.DB) {
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.