Commit Graph
14 Commits
Author SHA1 Message Date
Mura LiandLunny Xiao 754482bf5d Add integration test for repository migration (#1983) 2017-06-20 19:23:16 +08:00
Mura LiandLunny Xiao 4d2ea7dc41 Add integration test for issue creating (#2002) 2017-06-18 21:25:58 +08:00
Mura LiandLunny Xiao 01322af2e8 Add integration test for pull-request merge (#1912) 2017-06-15 19:20:39 +08:00
Mura LiandBo-Yi Wu 033aaf4b38 Add pull-create integration test (#1972) 2017-06-15 02:01:51 -05:00
Mura LiandLunny Xiao 662b8bc2a2 Add integration test for file editing (#1907) 2017-06-08 19:15:41 +08:00
Mura LiandLunny Xiao edbb9eefd6 Fix race when running commands with timeout (#1465)
Update vendored module code.gitea.io/git
2017-04-07 19:23:39 -07:00
Mura LiandBo-Yi Wu 2d1efcc270 Add GOFLAGS and EXTRA_GOFLAGS (#1438) 2017-04-05 16:10:32 +08:00
Mura LiandLunny Xiao b746757209 Remove unused mutex field (#1440) 2017-04-04 01:54:02 -07:00
Mura LiandBo-Yi Wu 93c25c9a35 Fix races in the log module by using syncmap (#1421) 2017-04-03 10:22:26 +08:00
Mura LiandBo-Yi Wu 6a39250579 Add length check for the return string (#1420)
* Add length check for the return string

* Differentiate error paths and logging messages

* Rectify error message
2017-03-31 16:42:23 +08:00
Mura LiandLunny Xiao bdcc1a23e0 Add integration test for signup (#1135)
* Add integration test for signup

* Remove unused functions

* Refactoring

* Add repo_create_test.go

* Rollback the incomplete repo create test

* Comply with linter requirements and simplify the code a little bit
2017-03-11 22:30:29 +08:00
Mura LiandLunny Xiao 288226e13c Fix stray directories generated by integration tests (#1134) 2017-03-07 15:38:26 +08:00
Mura LiandLunny Xiao 848293671b Add basic integration test infrastructure (and new endpoint /api/v1/version for testing it) (#741)
* Implement '/api/v1/version'

* Cleanup and various fixes

* Enhance run.sh

* Add install_test.go

* Add parameter utils.Config for testing handlers

* Re-organize TestVersion.go

* Rename functions

* handling process cleanup properly

* Fix missing function renaming

* Cleanup the 'retry' logic

* Cleanup

* Remove unneeded logging code

* Logging messages tweaking

* Logging message tweaking

* Fix logging messages

* Use 'const' instead of hardwired numbers

* We don't really need retries anymore

* Move constant ServerHttpPort to install_test.go

* Restore mistakenly removed constant

* Add required comments to make the linter happy.

* Fix comments and naming to address linter's complaints

* Detect Gitea executale version automatically

* Remove tests/run.sh, `go test` suffices.

* Make `make build` a prerequisite of `make test`

* Do not sleep before trying

* Speedup the server pinging loop

* Use defined const instead of hardwired numbers

* Remove redundant error handling

* Use a dedicated target for running code.gitea.io/tests

* Do not make 'test' depend on 'build' target

* Rectify the excluded package list

* Remove redundant 'exit 1'

* Change the API to allow passing test.T to test handlers

* Make testing.T an embedded field

* Use assert.Equal to comparing results

* Add copyright info

* Parametrized logging output

* Use tmpdir instead

* Eliminate redundant casting

* Remove unneeded variable

* Fix last commit

* Add missing copyright info

* Replace fmt.Fprintf with fmt.Fprint

* rename the xtest to integration-test

* Use Symlink instead of hard-link for cross-device linking

* Turn debugging logs on

* Follow the existing framework for APIs

* Output logs only if test.v is true

* Re-order import statements

* Enhance the error message

* Fix comment which breaks the linter's rule

* Rename 'integration-test' to 'e2e-test' for saving keystrokes

* Add comment to avoid possible confusion

* Rename tests -> integration-tests

Also change back the Makefile to use `make integration-test`.

* Use tests/integration for now

* tests/integration -> integrations

Slightly flattened directory hierarchy is better.

* Update Makefile accordingly

* Fix a missing change in Makefile

* govendor update code.gitea.io/sdk/gitea

* Fix comment of struct fields

* Fix conditional nonsense

* Fix missing updates regarding version string changes

* Make variable naming more consistent

* Check http status code

* Rectify error messages
2017-03-06 22:13:17 +08:00
typelessandLunny Xiao 937b4b5aa1 Speed up conflict checking in pull request creation (#276)
* Speed up conflict checking in pull request creation

In order to check conflicts of a PR, we set up a working tree by
cloning the base branch, which is quite time-consuming when the repository is huge.
Instead, this PR uses `git read-tree` and `git apply --check --cached` to check conflicts.

For #258

* Use $GIT_INDEX_FILE instead of --index-output to avoid lockfile problem

The lockfile gets renamed to the final destination after the operation
finishes. But it must be located in the same filesystem, which prevents
us from using /tmp.

* Temporary file names should not prefixed with '-'
2016-12-29 22:59:52 +08:00