Commit Graph

49 Commits (fecd8f949dedac0751db99dec590ff12ae56818d)

Author SHA1 Message Date
Lunny Xiao a8c024043c Improve integration tests ()
* improve integration tests

* fix Makefile

* improve makefile and integration docs
Lunny Xiao f83db078f0 Move database settings from models to setting ()
* 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
Tamal Saha 171b359877 Use gitea forked macaron ()
Signed-off-by: Tamal Saha <tamal@appscode.com>
Antoine GIRARD d02566a8ea integration tests: Use t.Helper() ()
kolaente f9ec2f89f2 Add golangci ()
zeripath e55c874dd2 Add work path CLI option ()
Makes it possible to set the work path as a CLI option instead of
relying on environment variables which are somewhat opaque
zeripath ce8de35334 Remove local clones & make hooks run on merge/edit/upload ()
* Add options to git.Clone to make it more capable

* Begin the process of removing the local copy and tidy up

* Remove Wiki LocalCopy Checkouts

* Remove the last LocalRepo helpers

* Remove WithTemporaryFile

* Enable push-hooks for these routes

* Ensure tests cope with hooks

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove Repository.LocalCopyPath()

* Move temporary repo to use the standard temporary path

* Fix the tests

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove LocalWikiPath

* Fix missing remove

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Use AppURL for Oauth user link ()

* Use AppURL for Oauth user link

Fix 

* Update oauth.go

* Update oauth.go

* internal/ssh: ignore env command totally ()

* ssh: ignore env command totally

* Remove commented code 

Needed fix described in issue 

* Escape the commit message on issues update and title in telegram hook ()

* update sdk to latest ()

* improve description of branch protection (fix ) ()

The branch protection description text were not quite accurate.

* Fix logging documentation ()

* ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG

* Allow DISABLE_ROUTER_LOG to be set in the [log] section

* [skip ci] Updated translations via Crowdin

* Move sdk structs to modules/structs ()

* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
zeripath 8d0d7bc28d Make CustomPath, CustomConf and AppWorkPath configurable at build ()
Richard Mahn 2262811e40 Fixes 4762 - Content API for Creating, Updating, Deleting Files ()
zeripath c02c6a144f Fix race in integration testlogger ()
* Fix race in logger

* At testing end drop the reference to the last test.
zeripath 5422f23ed8 Quieter Integration Tests ()
* 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
zeripath 2a03e96bce
Allow markdown files to read from the LFS ()
This PR makes it possible for the markdown renderer to render images and media straight from the LFS.

Fix 

Signed-off-by: Andrew Thornton [art27@cantab.net](mailto:art27@cantab.net)
Lunny Xiao 7fd34c0517
fix lfs version check warning log when using ssh protocol ()
kolaente 6db7dbd333 Added test environment for mssql ()
* Added test environment for m$sql

* Added template for test environment for m$sql

* Fix password

* Fix password (again)

* Fix password (again again)

* Fix db

* Ci trigger (Looking at you drone....)

* Ci trigger (Looking at you drone....)

* Ci trigger (Looking at you drone....)

* Ci trigger (Looking at you drone....)

* Create master database for mssql integration tests

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Create database only if master do not exist

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix mssql integration tests by using custom database "gitea"

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Moved defer

* bump xorm

* updated xorm

* Fixed build
B-OnTheGo e47df0b301 Enforce token on api routes [fixed critical security issue ] ()
techknowlogick ab55ca7ebd
Add ability to delete a token ()
Fix 
Lauris BH be1330ec89 Remove hardcoded paths to fix randomly failing tests ()
* Remove hardcoded paths to fix randomly failing tests

* Use correct function for merge path
Ethan Koenig befa7445d2 Unit tests for routers/repo/issue_label ()
Ethan Koenig 682ac11958 Log unexpected responses in integration tests ()
* Log flash error message in integration tests

* Also log short, non-HTML responses
Ethan Koenig d1efe2078a Fix integration tests ()
Ethan Koenig e59adcde65 Use httptest in integration tests ()
Lunny Xiao f70758dec9 Add git clone test on integration test ()
Ethan Koenig 1b6a962e70 Include HTTP method in test error message ()
Ethan Koenig 5866eb2321 Code/repo search ()
Indexed search of repository contents (for default branch only)
Ethan Koenig 6c6533fb31 Make integration tests more user-friendly ()
Ethan Koenig b0f7457d9e Improve issue search ()
* Improve issue indexer

* Fix new issue sqlite bug

* Different test indexer paths for each db

* Add integration indexer paths to make clean
Lunny Xiao 1739e84ac0 improve protected branch to add whitelist support ()
* improve protected branch to add whitelist support

* fix lint

* fix style check

* fix tests

* fix description on UI and import

* fix test

* bug fixed

* fix tests and languages

* move isSliceInt64Eq to util pkg; improve function names & typo
Antoine GIRARD 69dfe43ffc Fix some tests : make coverage -> test ()
* Fix test : make coverage -> test

* Refactor integration tests to be able to run them in parallel

* Add custom local repository temp path
Ethan Koenig d23b36c598 Error message for integration test ()
David Schneiderbauer 8aadf79f80 Add integration tests for signin ()
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
Ethan Koenig 89cd4dd424 Cache session cookies in tests ()
Ethan Koenig f1adaef458 Less verbose integration tests ()
* Helper functions for intergration test boilerplate
Ethan Koenig f64c232953 Improve integration test helper functions ()
Set request headers in helper functions, and new helper for requests with string-formatted URLs
Ethan Koenig 3ffedeab03 Fix bug in issue labels API ()
Ethan Koenig 255adc40ae Don't show non-comments in comments API ()
Bo-Yi Wu 90f9bb12c6 fix golint error and rename func for suggestion. ()
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Antoine GIRARD 6233e88f7f Use testing benchmark interface ()
Ethan Koenig ce9b86082c Consolidate boilerplate in integration tests ()
Kim "BKC" Carlbäcker 889409ba31 Fix setting.AppPath for integration tests ()
Fix setting.AppPath for integration tests
Ethan Koenig 23d0735f90 Absolute path for setting.CustomConf
Ethan Koenig 61716bd8f7 Display URLs in integration test logs ()
Ethan Koenig e9b1b908ee Fix setting.AppPath for integration tests
Ethan Koenig 251fb935ff Don't recreate database in integration tests ()
Lunny Xiao d98a86d2a2 remove sqlite tag when integration test with mysql/postgres AND recreate database when init integration test ()
Lunny Xiao 2bb8b3a562 fix bug when push a branch name with / & fix an integration test bug ()
Lauris BH 0144817971 Do not allow commiting to protected branch from online editor ()
* Do not allow commiting to protected branch from online editor

* Add editor integration tests for adding new file and not allowing to add new file to protected branch
Ethan Koenig 66c803fae2 MySQL, Postgres integration tests in drone ()
* MySQL, Postgres integration tests in drone

* Fix .drone.yml

* sign drone

* resign drone
Lunny Xiao fca7ddc6ea improve integration test to resue models/fixtures and store git repos with tests ()
* improve integration test to resue models/fixtures and store git repos with source

* use gitea-integration-meta dir instead .tar.gz and cleanup every before every test

* fix import package name
Ethan Koenig c58708d3ee Integration test framework ()
* Integration test framework

* udpate drone sign

* Formatting fixes and move router.go to routers/

* update sign for drone