diff --git a/tests/integration/migration-test/forgejo-v1.19.0.mysql.sql.gz b/tests/integration/migration-test/forgejo-v1.19.0.mysql.sql.gz new file mode 100644 index 000000000..4cea13baf Binary files /dev/null and b/tests/integration/migration-test/forgejo-v1.19.0.mysql.sql.gz differ diff --git a/tests/integration/migration-test/forgejo-v1.19.0.postgres.sql.gz b/tests/integration/migration-test/forgejo-v1.19.0.postgres.sql.gz new file mode 100644 index 000000000..7fdc409db Binary files /dev/null and b/tests/integration/migration-test/forgejo-v1.19.0.postgres.sql.gz differ diff --git a/tests/integration/migration-test/forgejo-v1.19.0.sqlite3.sql.gz b/tests/integration/migration-test/forgejo-v1.19.0.sqlite3.sql.gz new file mode 100644 index 000000000..dba4bafbd Binary files /dev/null and b/tests/integration/migration-test/forgejo-v1.19.0.sqlite3.sql.gz differ diff --git a/tests/integration/migration-test/migration_test.go b/tests/integration/migration-test/migration_test.go index 556a54015..82253739e 100644 --- a/tests/integration/migration-test/migration_test.go +++ b/tests/integration/migration-test/migration_test.go @@ -98,7 +98,7 @@ func availableVersions() ([]string, error) { return nil, err } defer migrationsDir.Close() - versionRE, err := regexp.Compile("gitea-v(?P.+)\\." + regexp.QuoteMeta(setting.Database.Type.String()) + "\\.sql.gz") + versionRE, err := regexp.Compile(".*-v(?P.+)\\." + regexp.QuoteMeta(setting.Database.Type.String()) + "\\.sql.gz") if err != nil { return nil, err } @@ -122,7 +122,10 @@ func readSQLFromFile(version string) (string, error) { filename := fmt.Sprintf("tests/integration/migration-test/gitea-v%s.%s.sql.gz", version, setting.Database.Type) if _, err := os.Stat(filename); os.IsNotExist(err) { - return "", nil + filename = fmt.Sprintf("tests/integration/migration-test/forgejo-v%s.%s.sql.gz", version, setting.Database.Type) + if _, err := os.Stat(filename); os.IsNotExist(err) { + return "", nil + } } file, err := os.Open(filename)