[bugfix] Fix loss of account info on export/import, add tests (#759)

* start adding additional tests

* use random database address for in-memory sqlite

* add more fields to account export
This commit is contained in:
tobi
2022-08-22 11:21:36 +02:00
committed by GitHub
parent 570fa7c359
commit b96533ca8f
4 changed files with 74 additions and 10 deletions

View File

@@ -21,17 +21,22 @@ package trans_test
import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/testrig"
)
type TransTestSuite struct {
suite.Suite
db db.DB
db db.DB
testAccounts map[string]*gtsmodel.Account
}
func (suite *TransTestSuite) SetupTest() {
testrig.InitTestLog()
testrig.InitTestConfig()
testrig.InitTestLog()
suite.testAccounts = testrig.NewTestAccounts()
suite.db = testrig.NewTestDB()
testrig.StandardDBSetup(suite.db, nil)
}