Disable pre-receive check in test env

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-08-14 13:27:51 +02:00
parent c8614cbbe7
commit 9011a32234
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A

View file

@ -40,6 +40,9 @@ module TestEnv
# Setup GitLab shell for test instance
setup_gitlab_shell
# Skip pre-receive check so we can use web editor
disable_pre_receive
# Create repository for FactoryGirl.create(:project)
setup_factory_repo
@ -57,6 +60,10 @@ module TestEnv
and_call_original
end
def disable_pre_receive
allow_any_instance_of(PreCommitService).to receive(:execute).and_return(true)
end
# Clean /tmp/tests
#
# Keeps gitlab-shell and gitlab-test