diff options
author | zeripath <art27@cantab.net> | 2019-12-26 11:29:45 +0000 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-12-26 13:29:45 +0200 |
commit | 7bfb83e0642530183cc15f3c9208d95f88fdc79a (patch) | |
tree | 7e3670ea97ac6e9304a8df5488fed6839d1f3dc4 /modules/repofiles/action_test.go | |
parent | 114d474f02f8e4148b9fd65c8f2bc7b47f924c17 (diff) | |
download | gitea-7bfb83e0642530183cc15f3c9208d95f88fdc79a.tar.gz gitea-7bfb83e0642530183cc15f3c9208d95f88fdc79a.zip |
Batch hook pre- and post-receive calls (#8602)
* make notifyWatchers work on multiple actions
* more efficient multiple notifyWatchers
* Make CommitRepoAction take advantage of multiple actions
* Batch post and pre-receive results
* Set batch to 30
* Auto adjust timeout & add logging
* adjust processing message
* Add some messages to pre-receive
* Make any non-200 status code from pre-receive an error
* Add missing hookPrintResults
* Remove shortcut for single action
* mistaken merge fix
* oops
* Move master branch to the front
* If repo was empty and the master branch is pushed ensure that that is set as the default branch
* fixup
* fixup
* Missed HookOptions in setdefaultbranch
* Batch PushUpdateAddTag and PushUpdateDelTag
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/repofiles/action_test.go')
-rw-r--r-- | modules/repofiles/action_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/repofiles/action_test.go b/modules/repofiles/action_test.go index 5a4c6231f3..97ac1c45e9 100644 --- a/modules/repofiles/action_test.go +++ b/modules/repofiles/action_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" ) -func testCorrectRepoAction(t *testing.T, opts CommitRepoActionOptions, actionBean *models.Action) { +func testCorrectRepoAction(t *testing.T, opts *CommitRepoActionOptions, actionBean *models.Action) { models.AssertNotExistsBean(t, actionBean) assert.NoError(t, CommitRepoAction(opts)) models.AssertExistsAndLoadBean(t, actionBean) @@ -121,7 +121,7 @@ func TestCommitRepoAction(t *testing.T) { s.action.Repo = repo s.action.IsPrivate = repo.IsPrivate - testCorrectRepoAction(t, s.commitRepoActionOptions, &s.action) + testCorrectRepoAction(t, &s.commitRepoActionOptions, &s.action) } } |