Skip to content

Commit 73c2e5d

Browse files
authored
Merge branch 'master' into fixtest
2 parents 8002154 + 609ab8b commit 73c2e5d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/continuous_integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [master]
66
pull_request:
77
branches: [master]
8+
workflow_dispatch:
89

910
jobs:
1011
continuous_integration_build:

tests/units/test_lib.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env ruby
22

33
require File.dirname(__FILE__) + '/../test_helper'
4+
require "fileutils"
45

56
# tests all the low level git communication
67
#
@@ -51,8 +52,13 @@ def test_commit_with_no_verify
5152
move_file(pre_commit_path, pre_commit_path_bak)
5253

5354
# Adds a pre-commit file that should throw an error
54-
create_file(pre_commit_path, 'echo Pre-commit file. Shoud not execute; exit 1') # Error when executed
55-
File.chmod(0111, pre_commit_path)
55+
create_file(pre_commit_path, <<~PRE_COMMIT_SCRIPT)
56+
#!/bin/sh
57+
echo "pre-commit script exits with an error"
58+
exit 1
59+
PRE_COMMIT_SCRIPT
60+
61+
FileUtils.chmod("+x", pre_commit_path)
5662

5763
create_file("#{@wdir}/test_file_2", 'content test_file_2')
5864
@lib.add('test_file_2')

0 commit comments

Comments
 (0)