File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def in_temp_repo(clone_name)
45
45
def create_temp_repo ( clone_name )
46
46
clone_path = File . join ( TEST_FIXTURES , clone_name )
47
47
filename = 'git_test' + Time . now . to_i . to_s + rand ( 300 ) . to_s . rjust ( 3 , '0' )
48
- path = File . expand_path ( File . join ( "/tmp/" , filename ) )
48
+ path = File . expand_path ( File . join ( Dir . tmpdir , filename ) )
49
49
FileUtils . mkdir_p ( path )
50
50
@tmp_path = File . realpath ( path )
51
51
FileUtils . cp_r ( clone_path , @tmp_path )
Original file line number Diff line number Diff line change @@ -13,15 +13,22 @@ class TestSignedCommits < Test::Unit::TestCase
13
13
def in_repo_with_signing_config ( &block )
14
14
in_temp_dir do |path |
15
15
`git init`
16
- `ssh-keygen -t dsa -N "" -C "test key" -f .git/test-key`
16
+ ssh_key_file = File . expand_path ( File . join ( '.git' , 'test-key' ) )
17
+ `ssh-keygen -t dsa -N "" -C "test key" -f "#{ ssh_key_file } "`
17
18
`git config --local gpg.format ssh`
18
- `git config --local user.signingkey .git/test-key`
19
+ `git config --local user.signingkey #{ ssh_key_file } .pub`
20
+
21
+ raise "ERROR: No .git/test-key file" unless File . exist? ( "#{ ssh_key_file } .pub" )
19
22
20
23
yield
21
24
end
22
25
end
23
26
24
27
def test_commit_data
28
+ # Signed commits should work on windows, but this test is omitted until the setup
29
+ # on windows can be figured out
30
+ omit ( 'Omit testing of signed commits on Windows' ) if windows_platform?
31
+
25
32
in_repo_with_signing_config do
26
33
create_file ( 'README.md' , '# My Project' )
27
34
`git add README.md`
You can’t perform that action at this time.
0 commit comments