Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
d9afbf47
Commit
d9afbf47
authored
Nov 25, 2016
by
Elan Ruusamäe
Committed by
Sean McGivern
Dec 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test expected hook order
parent
f3512031
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
spec/gitlab_custom_hook_spec.rb
spec/gitlab_custom_hook_spec.rb
+30
-0
No files found.
spec/gitlab_custom_hook_spec.rb
View file @
d9afbf47
...
...
@@ -224,4 +224,34 @@ describe GitlabCustomHook do
gitlab_custom_hook
.
post_receive
(
changes
)
end
end
context
"executing hooks in expected order"
do
before
do
create_repo_hooks_d
(
hook_ok
,
'01-test'
)
create_repo_hooks_d
(
hook_ok
,
'02-test'
)
create_global_hooks_d
(
hook_ok
,
'03-test'
)
create_global_hooks_d
(
hook_ok
,
'04-test'
)
end
it
"executes hooks in order"
do
expect_call_receive_hook
(
"custom_hooks/pre-receive.d/01-test"
).
ordered
expect_call_receive_hook
(
"custom_hooks/pre-receive.d/02-test"
).
ordered
expect_call_receive_hook
(
"hooks/pre-receive.d/03-test"
).
ordered
expect_call_receive_hook
(
"hooks/pre-receive.d/04-test"
).
ordered
expect_call_update_hook
(
"custom_hooks/update.d/01-test"
).
ordered
expect_call_update_hook
(
"custom_hooks/update.d/02-test"
).
ordered
expect_call_update_hook
(
"hooks/update.d/03-test"
).
ordered
expect_call_update_hook
(
"hooks/update.d/04-test"
).
ordered
expect_call_receive_hook
(
"custom_hooks/post-receive.d/01-test"
).
ordered
expect_call_receive_hook
(
"custom_hooks/post-receive.d/02-test"
).
ordered
expect_call_receive_hook
(
"hooks/post-receive.d/03-test"
).
ordered
expect_call_receive_hook
(
"hooks/post-receive.d/04-test"
).
ordered
gitlab_custom_hook
.
pre_receive
(
changes
)
gitlab_custom_hook
.
update
(
ref_name
,
old_value
,
new_value
)
gitlab_custom_hook
.
post_receive
(
changes
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment