aboutsummaryrefslogtreecommitdiffstats
path: root/models/unit_tests.go
Commit message (Collapse)AuthorAgeFilesLines
* upgrade to use testfixtures v3 (#11904)techknowlogick2020-06-171-2/+1
| | | | | | | | | | | | | | | * upgrade to use testfixtures v3 * simplify logic * make vendor * update per @lunny * Update templates/repo/empty.tmpl * Update templates/repo/empty.tmpl Co-authored-by: Lauris BH <lauris@nix.lv>
* Upgrade xorm to v1.0.0 (#10646)Lunny Xiao2020-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Upgrade xorm to v1.0.0 * small nit * Fix tests * Update xorm * Update xorm * fix go.sum * fix test * Fix bug when dump * Fix bug * update xorm to latest * Fix migration test * update xorm to latest * Fix import order * Use xorm tag
* 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>
* Move fixture generation to contrib and add test (#10277)guillep2k2020-02-151-4/+8
| | | | | | | | | | | | | | | | | | * Add fixture gen tool and fix "access" test * Close file before exiting * Add missing repo_unit for repo id: 5 * Fix count on TestAPIOrgRepos * Generate access fixture from contrib and add test * Remove old access fixture generation * Fix lint Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* 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-1/+1
| | | | | | | | | | | | | | | | | | * 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
* Use gitea forked macaron (#7933)Tamal Saha2019-08-231-1/+1
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* Move commit repo action from models to repofiles package (#7645)Lunny Xiao2019-07-301-0/+7
| | | | | | * move commit repo action from models to repofiles package * fix unit tests
* Fix error log when loading issues caused by a xorm bug (#7271)Lunny Xiao2019-06-231-1/+1
| | | | | | | | | | | | * fix error log when loading issues caused by a xorm bug * upgrade packages * fix fmt * fix Consistency * fix tests
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-171-0/+2
|
* refactor issue indexer, add some testing and fix a bug (#6131)Lunny Xiao2019-02-211-4/+0
| | | | | | | | * refactor issue indexer, add some testing and fix a bug * fix error copyright year on comment header * issues indexer package import keep consistent
* Refactor issue indexer (#5363)Lunny Xiao2019-02-191-0/+4
|
* User action heatmap (#5131)kolaente2018-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added basic heatmap data * Added extra case for sqlite * Built basic heatmap into user profile * Get contribution data from api & styling * Fixed lint & added extra group by statements for all database types * generated swagger spec * generated swagger spec * generated swagger spec * fixed swagger spec * fmt * Added tests * Added setting to enable/disable user heatmap * Added locale for loading text * Removed UseTiDB * Updated librejs & moment.js * Fixed import order * Fixed heatmap in postgresql * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: kolaente <konrad@kola-entertainments.de> * Added copyright header * Fixed a bug to show the heatmap for the actual user instead of the currently logged in * Added integration test for heatmaps * Added a heatmap on the dashboard * Fixed timestamp parsing * Hide heatmap on mobile * optimized postgresql group by query * Improved sqlite group by statement
* Fix integer constant overflows in tests (#4616)Dennis Menschel2018-08-061-1/+2
| | | | | | | | | | | | | | | | | | * Use integer limit value [1] instead of hard-coded magic constant for NonexistentID. * Explicitly use int64 in order to avoid the following errors on 32 bit architectures: # code.gitea.io/gitea/integrations ./api_admin_test.go:50:34: constant 9223372036854775807 overflows int ./api_token_test.go:47:34: constant 9223372036854775807 overflows int [...] # code.gitea.io/gitea/models ./action_test.go:179:15: constant 9223372036854775807 overflows int [1] https://golang.org/pkg/math/#pkg-constants Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
* Use unique temp dirs in unit tests (#3494)Ethan Koenig2018-02-211-8/+25
| | | | | | | | * Use unique temp dirs in unit tests * Remove temp dirs after tests run * os.RemoveAll -> removeAllWithRetry
* Force remove test repo root path in case previous test is still locking it ↵Lauris BH2018-02-181-1/+14
| | | | | | (#3528) Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
* Add more bench (#3161)Antoine GIRARD2017-12-241-7/+7
| | | | | | * Improve makefile + Add benchs * Apply recommendations of @ethantkoenig
* Unit tests for routers/repo/issue_label (#3198)Ethan Koenig2017-12-151-1/+18
|
* Fix compile failed without gcc (#3130)Lunny Xiao2017-12-101-1/+0
| | | | | | * fix comile failed without gcc * add sqlite tag for unit test
* Unit tests for wiki routers (#3022)Ethan Koenig2017-11-301-5/+32
|
* Don't print SQL in unit tests (#2995)Ethan Koenig2017-11-271-1/+4
| | | * Add GITEA_UNIT_TESTS_VERBOSE environment variable to enable printing SQL
* Complete push webhooks (#2530)David Schneiderbauer2017-09-211-0/+10
| | | | | | | | | | | | | | | | | * implemented missing 'delete' push webhooks moreover created ActionDeleteBranch and ActionDeleteTag * add CommitRepoAction tests for tag/branch creation/deletion * fixed error where push webhook not called if is new branch or tag removed unnecessary code * moved prepare unit test environment into separate method to be used across unit tests * add missing if clause in pushUpdate Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-131-0/+1
| | | | | | | | | | | | * use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
* Fix counts on issues dashboard (#2215)Ethan Koenig2017-08-031-0/+18
| | | | | | | | | | * Fix counts on issues dashboard * setupSess -> setupSession * Unit test * Load repo owners for issues
* Fix issue updated_unix bug (#2204)Ethan Koenig2017-07-271-0/+6
|
* Fix compiling without sqlite and gcc (#2177)Lauris BH2017-07-261-18/+0
|
* Fix search by issue type (#1914)Ethan Koenig2017-06-151-7/+33
| | | | * Fix search by issue type
* Run unused testEthan Koenig2017-06-041-6/+0
|
* Fix and test for delete user (#1713)Ethan Koenig2017-05-201-0/+92
* Fix and test for delete user * Run updates in batches * Unit test