Commit 9011a322 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Disable pre-receive check in test env

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c8614cbb
...@@ -40,6 +40,9 @@ module TestEnv ...@@ -40,6 +40,9 @@ module TestEnv
# Setup GitLab shell for test instance # Setup GitLab shell for test instance
setup_gitlab_shell setup_gitlab_shell
# Skip pre-receive check so we can use web editor
disable_pre_receive
# Create repository for FactoryGirl.create(:project) # Create repository for FactoryGirl.create(:project)
setup_factory_repo setup_factory_repo
...@@ -57,6 +60,10 @@ module TestEnv ...@@ -57,6 +60,10 @@ module TestEnv
and_call_original and_call_original
end end
def disable_pre_receive
allow_any_instance_of(PreCommitService).to receive(:execute).and_return(true)
end
# Clean /tmp/tests # Clean /tmp/tests
# #
# Keeps gitlab-shell and gitlab-test # Keeps gitlab-shell and gitlab-test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment