mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
gitea dump: include version & Check InstallLock (#12760)
* gitea dump: include version * Check InstallLock (close #12759) * fix test * fix lint
This commit is contained in:
@@ -21,6 +21,12 @@ func TestDumpDatabase(t *testing.T) {
|
||||
dir, err := ioutil.TempDir(os.TempDir(), "dump")
|
||||
assert.NoError(t, err)
|
||||
|
||||
type Version struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
Version int64
|
||||
}
|
||||
assert.NoError(t, x.Sync2(Version{}))
|
||||
|
||||
for _, dbName := range setting.SupportedDatabases {
|
||||
dbType := setting.GetDBTypeByName(dbName)
|
||||
assert.NoError(t, DumpDatabase(filepath.Join(dir, dbType+".sql"), dbType))
|
||||
|
Reference in New Issue
Block a user