aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/migration-test/migration_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Let package git depend on setting but not opposite (#15241)Lunny Xiao2021-06-261-1/+2
| | | | | * Let package git depend on setting but not opposite * private some package variables
* migrate from com.* to alternatives (#14103)65432020-12-251-2/+1
| | | | | | | | | | | | | | | * remove github.com/unknwon/com from models * dont use "com.ToStr()" * replace "com.ToStr" with "fmt.Sprint" where its easy to do * more refactor * fix test * just "proxy" Copy func for now * as per @lunny
* Fix pgsql migration test (#12844)Lunny Xiao2020-09-181-0/+3
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Don't keep running SetEngine in migration_test (#12860)zeripath2020-09-151-9/+1
| | | | | | There's no need to keep repeatedly running SetEngine in migration_test, as NewEngine calls it anyway. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add command to recreate tables (#12407)zeripath2020-09-061-0/+24
| | | | | | | | | | | | | | Provides new command: `gitea doctor recreate-table` which will recreate db tables and copy the old data in to the new table. This function can be used to remove the old warning of struct defaults being out of date. Fix #8868 Fix #3265 Fix #8894 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Re-attempt to delete temporary upload if the file is locked by another ↵zeripath2020-08-111-2/+3
| | | | | | | | | | | process (#12447) Replace all calls to os.Remove/os.RemoveAll by retrying util.Remove/util.RemoveAll and remove circular dependencies from util. Fix #12339 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
* Cache PullRequest Divergence (#10914)65432020-04-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Cache PullRequest Divergence * only re-calc divergence if AddTestPullRequestTask() is exec * migrate already open pulls * finalize * take care of closed&not-merged+deleted-branch pull requests * fix nil pointer exeption Signed-off-by: 6543 <6543@obermui.de> * try this * no error its a warn * init gitea-repositories-meta * dont use gitDivergence type * CI.restart() * CI.restart() * CI.restart() * CI.restart() * check IsUserAllowedToUpdate independend from CommitsBehind
* Fix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368)guillep2k2020-02-271-1/+1
| | | | | | | | | * Test locking immediate for SQLite3 * fix url field separator Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Add support for database schema in PostgreSQL (#8819)guillep2k2020-01-201-0/+26
| | | | | | | | | | | | | | | | | | | * Add support for database schema * Require setting search_path for the db user * Add schema setting to admin/config.tmpl * Use a schema different from default for psql tests * Update postgres scripts to use custom schema * Update to xorm/core 0.7.3 and xorm/xorm c37aff9b3a * Fix migration test Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Graceful: Xorm, RepoIndexer, Cron and Others (#9282)zeripath2019-12-151-1/+2
| | | | | | | | | | | | * Change graceful to use a singleton obtained through GetManager instead of a global. * Graceful: Make TestPullRequests shutdownable * Graceful: Make the cron tasks graceful * Graceful: AddTestPullRequest run in graceful ctx * Graceful: SyncMirrors shutdown * Graceful: SetDefaultContext for Xorm to be HammerContext * Avoid starting graceful for migrate commands and checkout * Graceful: DeliverHooks now can be shutdown * Fix multiple syncing errors in modules/sync/UniqueQueue & Make UniqueQueue closable * Begin the process of making the repo indexer shutdown gracefully
* Fix "data race" in testlogger (#9159)zeripath2019-11-261-4/+5
| | | | | | * Fix data race in testlogger * Update git_helper_for_declarative_test.go
* Upgrade xorm to v0.8.0 (#8536)Lunny Xiao2019-10-171-1/+1
|
* Move database settings from models to setting (#7806)Lunny Xiao2019-08-241-24/+24
| | | | | | | | | | | | | | | | | | * move database settings from models to setting * update docs * fix checkout pr * fix tests * fix lint * remove unsupported tidb options * correct wrong variable name * remove tidb totally
* Convert files to utf-8 for indexing (#7814)guillep2k2019-08-151-1/+2
| | | | | | | | | | | | | | * Convert files to utf-8 for indexing * Move utf8 functions to modules/base * Bump repoIndexerLatestVersion to 3 * Add tests for base/encoding.go * Changes to pass gosimple * Move UTF8 funcs into new modules/charset package
* Update to latest mssqldriver (#7613)zeripath2019-07-261-1/+9
| | | | * New driver does not tolerate USE - handle this by closing db and reopening db in the new dbname
* Add golangci (#6418)kolaente2019-06-121-15/+0
|
* Add mssql migration tests (#6852)zeripath2019-05-061-7/+7
|
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-171-1/+2
|
* Quieter Integration Tests (#6513)zeripath2019-04-071-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | * Rename BaseLogger to WriterLogger to help the creation of other providers * Don't export ColorBytes and ResetBytes from ColoredValues * Make integration tests only print logs if they fail * check can color before coloring * I always forget about MSSQL * Oh and use LEVEL in sqlite.ini * Make the test logger log at info - as it means you see the router * Remove empty expected changes * Make the migrations quieter too * Don't display SQL on error - it can be looked at in the file logs if necessary * Fix skip when using onGiteaRun
* Add migration test (#5773)zeripath2019-01-281-0/+245
* Add migration test This commit adds a simple migration test for v1.5.3, v1.6.4 and v1.7.0-rc3 Signed-off-by: Andrew Thornton <art27@cantab.net> * Automigrate based on available dbs * remove old ini file * Standardise the dialect names